mirror of
https://github.com/CJackHwang/ds2api.git
synced 2026-05-05 00:45:29 +08:00
ci: use gh cli for release asset upload
This commit is contained in:
17
.github/workflows/release-artifacts.yml
vendored
17
.github/workflows/release-artifacts.yml
vendored
@@ -174,10 +174,19 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Upload Release Assets
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ env.RELEASE_TAG }}
|
||||
files: |
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
TAG="${RELEASE_TAG}"
|
||||
FILES=(
|
||||
dist/*.tar.gz
|
||||
dist/*.zip
|
||||
dist/sha256sums.txt
|
||||
)
|
||||
|
||||
if gh release view "${TAG}" >/dev/null 2>&1; then
|
||||
gh release upload "${TAG}" "${FILES[@]}" --clobber
|
||||
else
|
||||
gh release create "${TAG}" "${FILES[@]}" --title "${TAG}" --notes ""
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user