Dedupe release triggers to prevent double-publish#21
Merged
Conversation
Publishing a GitHub Release that creates a new tag fires both the `release: published` and `push: tags` events, so v1.0.0 ran the publish job twice and the second run failed with "file already exists". Trigger publishing on tag push only — a Release that creates a new tag still fires this event, so the Release UI flow keeps working as a single run. Also add `skip-existing: true` to both publish steps as a safety net against duplicate uploads (e.g. manual re-runs). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XYvSCw1sjoG2AHbLPCsX7S
41 tasks
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.
Summary
The v1.0.0 release succeeded and is live on PyPI, but the release workflow produced one failed run: publishing a GitHub Release that creates a new tag fires both
release: publishedandpush: tags, so the publish job ran twice — the second hit "file already exists" on PyPI.This dedupes the triggers so future releases produce a single clean run.
Changes (
.github/workflows/release.yml)release: publishedtrigger. A GitHub Release that creates a new tag still emits thepushtag event, so the Release-UI flow keeps working — as a single run. CLIgit tag … && git pushis unchanged.skip-existing: trueon both publish steps as a safety net against duplicate uploads (e.g. manual re-runs of a run).Behavior after merge
git tag v1.2.3 && git push origin v1.2.3No change needed to the pending publisher (still
release.yml/ envpypi).🤖 Generated with Claude Code
Generated by Claude Code