Skip to content

Commit 08b3e09

Browse files
committed
fix: use gh CLI for release uploads to avoid conflicts
Switch from softprops/action-gh-release to gh CLI for uploading release assets. This avoids conflicts when the release already exists and provides better control with the --clobber flag to overwrite existing assets if needed.
1 parent efcbbdb commit 08b3e09

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,11 @@ jobs:
159159
(Get-FileHash -Algorithm SHA256 ${{ matrix.artifact_name }}).Hash + " " + "${{ matrix.artifact_name }}" | Out-File -Encoding ASCII ${{ matrix.asset_name }}.sha256
160160
161161
- name: Upload Release Asset
162-
uses: softprops/action-gh-release@v1
163-
with:
164-
tag_name: ${{ github.ref }}
165-
files: |
166-
target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
167-
target/${{ matrix.target }}/release/${{ matrix.asset_name }}.sha256
168-
fail_on_unmatched_files: false
162+
env:
163+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
164+
run: |
165+
cd target/${{ matrix.target }}/release/
166+
gh release upload ${{ github.ref_name }} ${{ matrix.artifact_name }} ${{ matrix.asset_name }}.sha256 --clobber
169167
170168
build-docker:
171169
name: Build and Push Docker Image

0 commit comments

Comments
 (0)