From 226313f4c08aa18f97e38611845d157320d48940 Mon Sep 17 00:00:00 2001 From: Paulo Henrique Garcia Date: Sun, 24 Nov 2024 09:42:25 +0100 Subject: [PATCH] Add logic to create release notes --- .github/workflows/build-on-tag.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build-on-tag.yml b/.github/workflows/build-on-tag.yml index e940ce6..d19b83e 100644 --- a/.github/workflows/build-on-tag.yml +++ b/.github/workflows/build-on-tag.yml @@ -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 @@ -43,6 +50,7 @@ jobs: with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} + body_path: release_notes.txt draft: false prerelease: true @@ -54,6 +62,7 @@ jobs: with: tag_name: latest release_name: Latest Release + body_path: release_notes.txt draft: false prerelease: true