Skip to content

Commit b0375ca

Browse files
committed
ci(release): upload release notes and commit changelog
1 parent 1736703 commit b0375ca

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,17 @@ jobs:
6363
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
6464
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
6565
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
66+
67+
- name: Update GitHub Release with Release Notes
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
run: |
71+
echo "Uploading release notes to GitHub Release..."
72+
gh release edit ${{ github.ref_name }} --notes-file RELEASE_NOTES.md
73+
74+
- name: Commit Changelog
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
run: |
78+
echo "Committing updated CHANGELOG.md..."
79+
./scripts/commit-changelog.sh ${{ github.ref_name }}

scripts/generate-changelog.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ if [ "$CI" != "true" ]; then
88
fi
99

1010
go tool git-chglog --next-tag "$1" --output CHANGELOG.md
11+
12+
# Verify the changelog was generated
13+
if [ ! -s CHANGELOG.md ]; then
14+
echo "Changelog generation failed or produced an empty file"
15+
exit 1
16+
fi

scripts/generate-release-notes.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ if [ "$CI" != "true" ]; then
88
fi
99

1010
go tool git-chglog --next-tag "$1" "$1" --output RELEASE_NOTES.md
11+
12+
# Verify the release notes were generated
13+
if [ ! -s RELEASE_NOTES.md ]; then
14+
echo "Release notes generation failed or produced an empty file"
15+
exit 1
16+
fi

0 commit comments

Comments
 (0)