Skip to content

Commit a09a6ed

Browse files
committed
update release-draft.yml
1 parent e64e61e commit a09a6ed

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/release-draft.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,25 @@ jobs:
5151
mv app/build/outputs/apk/release/app-release.apk "${{ github.event.inputs.app_name }}-${{ github.event.inputs.tag_name }}.apk"
5252
echo "renamed_apk=${{ github.event.inputs.app_name }}-${{ github.event.inputs.tag_name }}.apk" >> $GITHUB_ENV
5353
54+
# It uses `continue-on-error: true` so the job won't fail if it breaks
5455
- name: Get commit messages since last tag
5556
id: release_notes
57+
continue-on-error: true
5658
run: |
5759
git fetch --tags
5860
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
5961
if [ -z "$LAST_TAG" ]; then
6062
git log --pretty=format:"%s %h" > changelog.txt
6163
else
6264
git log ${LAST_TAG}..HEAD --pretty=format:"%s %h" > changelog.txt
63-
fi
65+
fi
66+
67+
68+
# If previous step failed
69+
- name: Ensure changelog.txt exists
70+
if: failure() || !exists('changelog.txt')
71+
run: echo "unable to find commits from last tag" > changelog.txt
72+
6473

6574
- name: Upload APK Artifact
6675
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)