fix: add skip-existing to PyPI publish to prevent re-upload failures#84
Closed
Dongbumlee wants to merge 1 commit into
Closed
fix: add skip-existing to PyPI publish to prevent re-upload failures#84Dongbumlee wants to merge 1 commit into
Dongbumlee wants to merge 1 commit into
Conversation
The publish-pypi step in release.yml fails with '400 File already exists' when a release workflow is re-triggered after a successful PyPI upload. This has blocked both v0.1.6 and v0.1.7 releases. Adding skip-existing: true makes the step idempotent — it succeeds silently when the exact same wheel is already on PyPI, while still rejecting uploads with different content for the same version. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
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 \publish-pypi\ step in
elease.yml\ fails with \400 File already exists\ when a release workflow is re-triggered after a successful PyPI upload. This has blocked both v0.1.6 and v0.1.7 releases from completing (GitHub Release step skipped).
Root Cause
\pypa/gh-action-pypi-publish\ does not have \skip-existing: true\ on the PyPI publish step (line 158-161). The TestPyPI step already has it — this is an inconsistency.
Fix
Add \skip-existing: true\ to the \publish-pypi\ step. This makes the step idempotent:
Impact