fix(block-ci): publish the draft a rerun of block-release finds

An interrupted first run can leave the tag with an unpublished draft.
The rerun took the existing-release branch, replaced the assets and
exited 0 with the release still a draft. Publish after the uploads,
keeping it off the repository's Latest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chris LuandClaude Opus 5.5 committed 2026-12-05 06:49:04 -08:00
1 parent eeef10aeb2
commit 3f356a0b21
2 files changed
+4 -2

No files matched your search

+2 -2
View File
@@ -140,10 +140,10 @@ jobs:
(cd "$out" && sha256sum "$asset" >SHA256SUMS)
prerelease=false
if [[ "$version" == *-* ]]; then prerelease=true; fi
# A rerun of a published tag replaces its assets instead of failing.
# A rerun replaces the assets, then publishes a draft an interrupted run left.
if gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
gh release edit "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --prerelease="$prerelease"
gh release upload "$GITHUB_REF_NAME" "$out/$asset" "$out/SHA256SUMS" --repo "$GITHUB_REPOSITORY" --clobber
gh release edit "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --prerelease="$prerelease" --draft=false --latest=false
else
gh release create "$GITHUB_REF_NAME" "$out/$asset" "$out/SHA256SUMS" --repo "$GITHUB_REPOSITORY" --verify-tag --latest=false \
--prerelease="$prerelease" --title "Seaweed Block $version" --notes-file "$NOTES"