From 3b331b15a42ce804699a731a01a8c29f967f41f2 Mon Sep 17 00:00:00 2001 From: xintaofei Date: Thu, 16 Apr 2026 00:55:18 +0800 Subject: [PATCH] fix(ci): replace softprops/action-gh-release with gh CLI for server asset upload softprops/action-gh-release defaults draft to false, which publishes the release prematurely before the publish-release job runs. Switch to gh release upload which only uploads assets without modifying release state, avoiding both the premature publish and the duplicate draft release issues caused by the GitHub API not returning drafts via getReleaseByTag. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/release.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e176f45..a42a3dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -456,21 +456,15 @@ jobs: - name: Upload to release (Unix) if: runner.os != 'Windows' - uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref_name }} - files: dist/${{ matrix.artifact }}.tar.gz + run: gh release upload "${{ github.ref_name }}" dist/${{ matrix.artifact }}.tar.gz --clobber - name: Upload to release (Windows) if: runner.os == 'Windows' - uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref_name }} - files: dist/${{ matrix.artifact }}.zip + run: gh release upload "${{ github.ref_name }}" dist/${{ matrix.artifact }}.zip --clobber build-docker: needs: