Skip to content

Commit

Permalink
Upload assets if a release for the tag already exists
Browse files Browse the repository at this point in the history
Closes #7
  • Loading branch information
mislav committed Jun 8, 2022
1 parent 28d6081 commit ecdcca7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build_and_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ if [ -n "$GPG_FINGERPRINT" ]; then
assets+=(checksums.txt checksums.txt.sig)
fi

gh release create "$tag" $prerelease --title="${GITHUB_REPOSITORY#*/} ${tag#v}" --generate-notes -- "${assets[@]}"
if ! gh release create "$tag" $prerelease --title="${GITHUB_REPOSITORY#*/} ${tag#v}" --generate-notes -- "${assets[@]}"; then
echo "trying to upload assets to an existing release instead..."
gh release upload "$tag" --clobber -- "${assets[@]}"
fi

0 comments on commit ecdcca7

Please sign in to comment.