Skip to content

Commit

Permalink
Add logic to create release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulohenriquesg committed Nov 24, 2024
1 parent 8b0b6e8 commit 226313f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ jobs:
- name: List APK files
run: ls -la app/build/outputs/apk/release/

- name: Generate release notes
run: |
latest_tag=$(git describe --tags --abbrev=0)
commit_messages=$(git log ${latest_tag}..HEAD --pretty=format:"%s")
release_message="Release Notes:\n\n$commit_messages"
echo -e "$release_message" > release_notes.txt
- name: Create Release from tag
id: create_release
uses: actions/create-release@v1
Expand All @@ -43,6 +50,7 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: release_notes.txt
draft: false
prerelease: true

Expand All @@ -54,6 +62,7 @@ jobs:
with:
tag_name: latest
release_name: Latest Release
body_path: release_notes.txt
draft: false
prerelease: true

Expand Down

0 comments on commit 226313f

Please sign in to comment.