From a4870efeb5c814bbbfcf191e1be6d01aa635eaab Mon Sep 17 00:00:00 2001 From: juice094 <160722440+juice094@users.noreply.github.com> Date: Wed, 6 May 2026 20:57:53 +0800 Subject: [PATCH] ci(release): replace softprops/action-gh-release with gh CLI + add permissions softprops/action-gh-release@v1 consistently fails with 403 / Too many retries on this repository. Switch to native gh release create CLI which uses the same GITHUB_TOKEN but has better error handling. Also add explicit permissions: contents: write. --- .github/workflows/release.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe2031a..01da81a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,9 @@ on: env: CARGO_TERM_COLOR: always +permissions: + contents: write + jobs: build-windows: name: Build Windows Release @@ -45,9 +48,10 @@ jobs: Compress-Archive -Path $outDir -DestinationPath "$outDir.zip" -Force Write-Host "Created $outDir.zip" - name: Upload to GitHub Release - uses: softprops/action-gh-release@v1 - with: - files: devbase-*-windows-x64.zip - generate_release_notes: true + shell: powershell env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + $version = "${{ github.ref_name }}" + $archive = "devbase-$version-windows-x64.zip" + gh release create $version $archive --generate-notes --repo ${{ github.repository }}