@@ -6,6 +6,7 @@ definitions:
6
6
environment :
7
7
groups :
8
8
- firebase_credentials
9
+ java : 17
9
10
cache :
10
11
cache_paths :
11
12
- $HOME/.gradle/caches
@@ -54,14 +55,18 @@ workflows:
54
55
events :
55
56
- push
56
57
branch_patterns :
57
- - pattern : develop
58
+ - pattern : ' develop'
58
59
scripts :
59
60
- *detekt_on_template_compose
60
61
- *unit_test_on_template_compose
61
62
- name : Build APK for staging
62
63
working_directory : ./template-compose
63
64
script : |
64
65
./gradlew assembleStagingDebug -PversionCode=$BUILD_NUMBER
66
+ - name : Generate release notes with the latest git commit
67
+ script : |
68
+ RELEASE_NOTE_CONTENT="$((git log -1 --merges | grep "\[") | grep . && echo "" || echo $(git log -1 --merges --format=%B))"
69
+ echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt
65
70
artifacts :
66
71
- *artifacts_template_compose
67
72
- *artifacts_staging_apk
@@ -81,14 +86,25 @@ workflows:
81
86
events :
82
87
- push
83
88
branch_patterns :
84
- - pattern : main
89
+ - pattern : ' main'
90
+ environment :
91
+ vars :
92
+ # Increase the clone depth to 50 to cover all commits from the latest tag
93
+ CM_CLONE_DEPTH : 50
94
+ groups :
95
+ - firebase_credentials
96
+ java : 17
85
97
scripts :
86
98
- *detekt_on_template_compose
87
99
- *unit_test_on_template_compose
88
100
- name : Build APK for production
89
101
working_directory : ./template-compose
90
102
script : |
91
103
./gradlew assembleProductionDebug -PversionCode=$BUILD_NUMBER
104
+ - name : Generate release notes with git commits from the latest tag
105
+ script : |
106
+ RELEASE_NOTE_CONTENT="$(git log --merges --pretty=%B $(git describe --abbrev=0 --tags)..HEAD | grep "\[")"
107
+ echo "$RELEASE_NOTE_CONTENT" | tee release_notes.txt
92
108
artifacts :
93
109
- *artifacts_template_compose
94
110
- *artifacts_production_apk
0 commit comments