Check if release tag exists before blindly creating/overriding

This commit is contained in:
tooomm 2026-09-26 21:00:21 +02:00 • committed by GitHub
parent 26a74c96c5
commit 500a34c2d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -85,13 +85,17 @@ jobs:
body_path: ${{ steps.prepare.outputs.body_path }}
prerelease: ${{ steps.prepare.outputs.is_beta }}
run: |
args=()
[[ $prerelease == yes ]] && args+=(--prerelease)
if gh release view "$tag_name" >/dev/null 2>&1; then
echo "::warning::Release $tag_name already exists"
else
args=()
[[ $prerelease == yes ]] && args+=(--prerelease)
gh release create "$tag_name" --verify-tag --draft "${args[@]}" \
--target "$target" \
--title "$release_name" \
--notes-file "$body_path"
gh release create "$tag_name" --verify-tag --draft "${args[@]}" \
--target "$target" \
--title "$release_name" \
--notes-file "$body_path"
fi
build-linux:
strategy:
@ -356,7 +360,7 @@ jobs:
with:
msbuild-architecture: x64
- name: "[macOS] Setup ccache"
- name: "[macOS] Install ccache"
if: matrix.os == 'macOS' && matrix.use_ccache == 1
run: brew install ccache