fix(release): publish assets in single serial step

Avoid race conditions during release uploads by moving asset publication out of matrix jobs and into one dedicated job.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ran
2026-02-24 22:57:46 +08:00
parent 30fe3edc39
commit 4d167929c7
+32 -4
View File
@@ -82,13 +82,41 @@ jobs:
UPX_ARGS: "-3"
run: scripts/release.sh
- name: Upload release assets
- name: Upload tar artifact
if: matrix.goos != 'windows'
uses: actions/upload-artifact@v4
with:
name: release-assets-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/*.tar.gz
if-no-files-found: error
retention-days: 1
- name: Upload zip artifact
if: matrix.goos == 'windows'
uses: actions/upload-artifact@v4
with:
name: release-assets-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/*.zip
if-no-files-found: error
retention-days: 1
publish-release:
needs: build-binaries
runs-on: ubuntu-latest
steps:
- name: Download release artifacts
uses: actions/download-artifact@v4
with:
pattern: release-assets-*
path: dist
merge-multiple: true
- name: Publish release assets
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.tar.gz
dist/*.zip
files: dist/*
tag_name: ${{ github.ref_name }}
overwrite_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}