Skip to content

Commit 22fbcbe

Browse files
committed
feat: Update release body and add changelog to release notes
This commit updates the release body to a static message and adds the changelog to the release notes. The `body_path` parameter in the `softprops/action-gh-release` action is replaced with a static message. A new step is added to update the GitHub release with the generated changelog using the GitHub CLI. This ensures the changelog is included in the release notes.
1 parent b57c2a5 commit 22fbcbe

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

.github/workflows/check.yml

+17-10
Original file line numberDiff line numberDiff line change
@@ -120,28 +120,35 @@ jobs:
120120
run: |
121121
zip -r Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip local-files version.txt
122122
123-
- name: Generate Changelog
124-
run: |
125-
echo "This is an automated release of the latest translation data." > CHANGELOG.md
126-
echo "" >> CHANGELOG.md
127-
echo "## Changelog" >> CHANGELOG.md
128-
git log $(git describe --tags --abbrev=0 @^)..@ --pretty=format:"- %s" >> CHANGELOG.md
129-
echo "" >> CHANGELOG.md
130-
cat CHANGELOG.md
131-
132123
- name: Create GitHub Release
133124
uses: softprops/action-gh-release@v1
134125
with:
135126
tag_name: ${{ env.VERSION }}
136127
name: Translation Update ${{ env.RELEASE_DATE }}
137-
body_path: CHANGELOG.md
128+
body: |
129+
This is an automated release of the latest translation data.
138130
files: |
139131
Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip
140132
draft: false
141133
prerelease: false
142134
env:
143135
GITHUB_TOKEN: ${{ secrets.PAT }}
144136

137+
- name: Generate Changelog
138+
run: |
139+
echo "This is an automated release of the latest translation data." > CHANGELOG.md
140+
echo "" >> CHANGELOG.md
141+
echo "## Changelog" >> CHANGELOG.md
142+
git log $(git describe --tags --abbrev=0 @^)..@ --pretty=format:"- %s" >> CHANGELOG.md
143+
echo "" >> CHANGELOG.md
144+
cat CHANGELOG.md
145+
146+
- name: Update GitHub Release with Changelog
147+
run: |
148+
gh release edit ${{ env.VERSION }} --notes-file CHANGELOG.md
149+
env:
150+
GH_TOKEN: ${{ secrets.PAT }}
151+
145152
- name: Send Notification to Discord
146153
uses: sarisia/actions-status-discord@v1
147154
if: always()

0 commit comments

Comments
 (0)