From 6dfd0f805282357d2ca4bbc89b32cb3e3b7a4f29 Mon Sep 17 00:00:00 2001 From: Gaoyang Date: Wed, 5 Aug 2026 22:30:39 +0800 Subject: [PATCH] fix: prevent duplicated release notes from matrix job re-generation The release job runs as a 4-way RID matrix, and each leg called action-gh-release with generate_release_notes: true, causing the generated notes to be appended to the same release once per leg. Split out a separate finalize-release job that runs once after all platform artifacts are uploaded to generate the notes and set the title. --- .github/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e11ea03..b88e264 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,8 +78,20 @@ jobs: - name: Upload to release uses: softprops/action-gh-release@v2 with: - name: AIUsageMonitor ${{ github.ref_name }} files: aimon-cli-${{ github.ref_name }}-${{ matrix.rid }}.* + + finalize-release: + name: Finalize release notes + needs: release + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Set title and generate notes + uses: softprops/action-gh-release@v2 + with: + name: AIUsageMonitor ${{ github.ref_name }} prerelease: ${{ contains(github.ref_name, '-') }} generate_release_notes: true