Skip to content

Make PyPI publish step idempotent (skip-existing: true)#5

Merged
mstorath merged 1 commit into
mainfrom
claude/release-skip-existing-2026-05
May 7, 2026
Merged

Make PyPI publish step idempotent (skip-existing: true)#5
mstorath merged 1 commit into
mainfrom
claude/release-skip-existing-2026-05

Conversation

@mstorath
Copy link
Copy Markdown
Owner

@mstorath mstorath commented May 7, 2026

Summary

Adds skip-existing: true to pypa/gh-action-pypi-publish in release.yml. The action now returns success when a file already exists on PyPI instead of erroring with HTTP 400.

Why

v1.0.1's first successful publish run uploaded all six artifacts. A subsequent re-run (or a partially-completed run that the user retries) tries to re-upload the same files, and PyPI rejects file reuse with 400 Bad Request. Without skip-existing, that second run is marked failed even though the release is fully shipped — noisy and confusing.

With skip-existing, future re-runs are no-ops if the version is already published, and partial uploads can be safely retried.

Test plan

  • PR merged
  • Future tag re-runs (intentional or accidental) on already-published versions show as green instead of failing on duplicate-file 400

@mstorath mstorath merged commit c24fa0b into main May 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant