fix(release): make the publish step idempotent - #6
Merged
Conversation
Publishing a release from the GitHub UI creates the tag AND the release before this workflow runs, so `gh release create` failed with "a release with the same tag name already exists" and no binaries were uploaded. Now the publish step checks for an existing release: if present it updates the notes and uploads assets with --clobber; otherwise it creates the release as before. Both the UI-publish and CLI tag-push flows now work and the step is safely re-runnable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JgWPXefHtzYcspK8zo4Bo6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The v0.2.0 release workflow failed at the publish step:
The build succeeded (all five platform binaries +
SHA256SUMS), but publishing the v0.2.0 release from the GitHub UI creates the tag and the release before the workflow runs. The tag push then triggered the workflow, whosegh release createcollided with the already-existing release — so no binaries were uploaded and the release is currently empty.Fix
Make the publish step idempotent:
--clobber.Both flows now work and the step is safely re-runnable.
Verification
Workflow YAML validated; the build+package matrix was already confirmed green in the failed run's logs (only the publish step failed). Docs/CI config only — no application code, nothing to unit-test.
After merge
The tag needs to point at a commit that contains this fix, so re-cutting v0.2.0 will pick it up (steps provided separately).
🤖 Generated with Claude Code
https://claude.ai/code/session_01JgWPXefHtzYcspK8zo4Bo6
Generated by Claude Code