Skip to content

Commit

Permalink
[#490] Add script for adding the release note
Browse files Browse the repository at this point in the history
  • Loading branch information
lydiasama committed Nov 10, 2023
1 parent ebf81b4 commit 41ff73f
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,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: Generating 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 +85,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
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: Generating 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 41ff73f

Please sign in to comment.