Skip to content

Commit

Permalink
Merge pull request #558 from nimblehq/chore/490-add-release-note-for-…
Browse files Browse the repository at this point in the history
…codemagic-cd

[#490] Add release note for Codemagic CD workflow
  • Loading branch information
ryan-conway authored Mar 21, 2024
2 parents 91c7ac8 + 449f9da commit 4e56383
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
20 changes: 18 additions & 2 deletions .cicdtemplate/.codemagic/codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ definitions:
environment:
groups:
- firebase_credentials
java: 17
cache:
cache_paths:
- $HOME/.gradle/caches
Expand Down Expand Up @@ -52,13 +53,17 @@ workflows:
events:
- push
branch_patterns:
- pattern: develop
- pattern: 'develop'
scripts:
- *detekt
- *unit_test
- name: Build APK for staging
script: |
./gradlew assembleStagingDebug -PversionCode=$BUILD_NUMBER
- name: Generate release notes with the latest git commit
script: |
RELEASE_NOTE_CONTENT="$((git log -1 --merges | grep "\[") | grep . && echo "" || echo $(git log -1 --merges --format=%B))"
echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt
artifacts:
- *artifacts_test_report
- *artifacts_staging_apk
Expand All @@ -78,13 +83,24 @@ workflows:
events:
- push
branch_patterns:
- pattern: main
- pattern: 'main'
environment:
vars:
# Increase the clone depth to 50 to cover all commits from the latest tag
CM_CLONE_DEPTH: 50
groups:
- firebase_credentials
java: 17
scripts:
- *detekt
- *unit_test
- name: Build APK for production
script: |
./gradlew assembleProductionDebug -PversionCode=$BUILD_NUMBER
- name: Generate release notes with git commits from the latest tag
script: |
RELEASE_NOTE_CONTENT="$(git log --merges --pretty=%B $(git describe --abbrev=0 --tags)..HEAD | grep "\[")"
echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt
artifacts:
- *artifacts_test_report
- *artifacts_production_apk
Expand Down
20 changes: 18 additions & 2 deletions codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ definitions:
environment:
groups:
- firebase_credentials
java: 17
cache:
cache_paths:
- $HOME/.gradle/caches
Expand Down Expand Up @@ -54,14 +55,18 @@ workflows:
events:
- push
branch_patterns:
- pattern: develop
- pattern: 'develop'
scripts:
- *detekt_on_template_compose
- *unit_test_on_template_compose
- name: Build APK for staging
working_directory: ./template-compose
script: |
./gradlew assembleStagingDebug -PversionCode=$BUILD_NUMBER
- name: Generate release notes with the latest git commit
script: |
RELEASE_NOTE_CONTENT="$((git log -1 --merges | grep "\[") | grep . && echo "" || echo $(git log -1 --merges --format=%B))"
echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt
artifacts:
- *artifacts_template_compose
- *artifacts_staging_apk
Expand All @@ -81,14 +86,25 @@ workflows:
events:
- push
branch_patterns:
- pattern: main
- pattern: 'main'
environment:
vars:
# Increase the clone depth to 50 to cover all commits from the latest tag
CM_CLONE_DEPTH: 50
groups:
- firebase_credentials
java: 17
scripts:
- *detekt_on_template_compose
- *unit_test_on_template_compose
- name: Build APK for production
working_directory: ./template-compose
script: |
./gradlew assembleProductionDebug -PversionCode=$BUILD_NUMBER
- name: Generate release notes with git commits from the latest tag
script: |
RELEASE_NOTE_CONTENT="$(git log --merges --pretty=%B $(git describe --abbrev=0 --tags)..HEAD | grep "\[")"
echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt
artifacts:
- *artifacts_template_compose
- *artifacts_production_apk
Expand Down

0 comments on commit 4e56383

Please sign in to comment.