@@ -110,6 +110,36 @@ jobs:
110110 env :
111111 APK_RELEASE_PATH : apk-release/*.apk
112112 steps :
113+ - name : Checkout repository
114+ uses : actions/checkout@v4
115+
116+ - name : Parse Build Tag & Release Notes from CHANGELOG.md
117+ id : parse_changelog
118+ run : |
119+ echo "Parsing CHANGELOG.md"
120+
121+ awk '
122+ BEGIN {found=0}
123+ /^##[[:space:]]*\[?v?[0-9]+\.[0-9]+\.[0-9]+.*\]?/ && found==0 {
124+ line=$0
125+ gsub(/^##[[:space:]]*/, "", line)
126+ sub(/[[:space:]]+-[[:space:]]*.*$/, "", line)
127+ gsub(/^\[|\]$/, "", line)
128+ tag=line
129+ if (tag !~ /^v/) tag = "v" tag
130+ found=1
131+ next
132+ }
133+ found==1 {
134+ if (/^##[[:space:]]+/) exit
135+ notes = notes $0 "\n"
136+ }
137+ END {
138+ printf("build_tag=%s\n", tag)
139+ printf("release_notes<<EOF\n%s\nEOF\n", notes)
140+ }
141+ ' CHANGELOG.md >> $GITHUB_OUTPUT
142+
113143 - name : Download APK artifact
114144 uses : actions/download-artifact@v4
115145 with :
@@ -122,5 +152,5 @@ jobs:
122152 allowUpdates : true
123153 artifacts : ${{ env.APK_RELEASE_PATH }}
124154 artifactContentType : apk
125- generateReleaseNotes : true
126- tag : latest_build
155+ tag : ${{ steps.parse_changelog.outputs.build_tag }}
156+ body : ${{ steps.parse_changelog.outputs.release_notes }}
0 commit comments