From 5a39b733ea1a8f32015275bcbec263cdccad823e Mon Sep 17 00:00:00 2001 From: SnapOtter Date: Sun, 10 May 2026 20:13:20 +0800 Subject: [PATCH] feat: apply custom release notes from .release-notes.md in release workflow --- .github/workflows/release.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df67c14e..7096f317 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,17 @@ jobs: - uses: ./.github/actions/setup + - name: Save release notes + id: notes + run: | + if [ -f .release-notes.md ]; then + cp .release-notes.md /tmp/release-notes.md + echo "has_notes=true" >> "$GITHUB_OUTPUT" + echo "Custom release notes found -- will apply after release." + else + echo "No .release-notes.md found -- using default release notes." + fi + - name: Run semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -49,6 +60,16 @@ jobs: fi fi + - name: Update GitHub release notes + if: steps.notes.outputs.has_notes == 'true' && steps.check.outputs.version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Updating release v${{ steps.check.outputs.version }} with custom notes..." + gh release edit "v${{ steps.check.outputs.version }}" \ + --notes-file /tmp/release-notes.md + echo "Release notes updated successfully." + docker: name: Build (${{ matrix.platform }}) needs: release