From 22fbcbe12c266f275c023aa1a42b20256fa68f8a Mon Sep 17 00:00:00 2001 From: Natsu Date: Thu, 20 Mar 2025 21:28:20 +0700 Subject: [PATCH] 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. --- .github/workflows/check.yml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ce42734f..bb4fef30 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -120,6 +120,20 @@ jobs: run: | zip -r Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip local-files version.txt + - 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. + files: | + Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + - name: Generate Changelog run: | echo "This is an automated release of the latest translation data." > CHANGELOG.md @@ -128,19 +142,12 @@ jobs: 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_path: CHANGELOG.md - files: | - Gakumas-Translation-Data-EN-${{ env.VERSION }}.zip - draft: false - prerelease: false + + - name: Update GitHub Release with Changelog + run: | + gh release edit ${{ env.VERSION }} --notes-file CHANGELOG.md env: - GITHUB_TOKEN: ${{ secrets.PAT }} + GH_TOKEN: ${{ secrets.PAT }} - name: Send Notification to Discord uses: sarisia/actions-status-discord@v1