From b57c2a5b314389f67d97f7defc0a83ecce1c0639 Mon Sep 17 00:00:00 2001 From: Natsu Date: Thu, 20 Mar 2025 21:22:21 +0700 Subject: [PATCH] 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. --- .github/workflows/check.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 798c0e59..ce42734f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -120,13 +120,21 @@ jobs: run: | 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 uses: softprops/action-gh-release@v1 with: tag_name: ${{ env.VERSION }} name: Translation Update ${{ env.RELEASE_DATE }} - body: | - This is an automated release of the latest translation data. + body_path: CHANGELOG.md files: | Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip draft: false