feat: Generate changelog and use it for release body

This commit introduces a changelog generation step in the `check.yml` workflow. The changelog is generated using `git log` to capture commit messages since the last tag.

The generated `CHANGELOG.md` file is then used as the body for the GitHub release, providing a more informative release description.
This commit is contained in:
2025-03-20 21:22:21 +07:00
parent a968d095c5
commit b57c2a5b31

View File

@@ -120,13 +120,21 @@ jobs:
run: | run: |
zip -r Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip local-files version.txt zip -r Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip local-files version.txt
- name: Generate Changelog
run: |
echo "This is an automated release of the latest translation data." > CHANGELOG.md
echo "" >> CHANGELOG.md
echo "## Changelog" >> CHANGELOG.md
git log $(git describe --tags --abbrev=0 @^)..@ --pretty=format:"- %s" >> CHANGELOG.md
echo "" >> CHANGELOG.md
cat CHANGELOG.md
- name: Create GitHub Release - name: Create GitHub Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
tag_name: ${{ env.VERSION }} tag_name: ${{ env.VERSION }}
name: Translation Update ${{ env.RELEASE_DATE }} name: Translation Update ${{ env.RELEASE_DATE }}
body: | body_path: CHANGELOG.md
This is an automated release of the latest translation data.
files: | files: |
Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip
draft: false draft: false