fix(ci): add skip-existing to production PyPI publish step#128
Merged
fix(ci): add skip-existing to production PyPI publish step#128
Conversation
Allows re-running the Release workflow (e.g. via workflow_dispatch) after v1.0.0 was already published without failing with a 400 error. The TestPyPI step already had skip-existing; this brings production in line. Does not affect new releases — PyPI silently skips files that already exist at that version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds the missing Sequence diagram for release rerun with skip-existing on production PyPI publishsequenceDiagram
actor Developer
participant GitHubActions as GitHubActionsWorkflow
participant PublishStep as PublishToPyPIStep
participant PyPI as PyPIRegistry
participant Sigstore as SigstoreSigningStep
Developer->>GitHubActions: Trigger workflow_dispatch rerun
GitHubActions->>PublishStep: Run gh-action-pypi-publish skip-existing true
PublishStep->>PyPI: Upload package version
alt Version already exists on PyPI
PyPI-->>PublishStep: 400 Bad Request version exists
PublishStep-->>GitHubActions: Treat as success due to skip-existing true
else Version not on PyPI
PyPI-->>PublishStep: 201 Created new release
PublishStep-->>GitHubActions: Success
end
GitHubActions->>Sigstore: Run sigstore signing step
Sigstore-->>GitHubActions: Signing completed
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
🔒 Security Analysis ReportSecurity Analysis ReportGenerated: Wed Apr 1 12:12:47 UTC 2026 Bandit Security ScanSafety Check ResultsPip-Audit Results |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
docdyhr
added a commit
that referenced
this pull request
Apr 1, 2026
Documents PRs #127 (sigstore @v3.3.0), #128 (skip-existing PyPI), and #129 (black CVE-2026-32274) under a new [1.0.1] section. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
docdyhr
added a commit
that referenced
this pull request
Apr 1, 2026
Documents PRs #127 (sigstore @v3.3.0), #128 (skip-existing PyPI), and #129 (black CVE-2026-32274) under a new [1.0.1] section. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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
skip-existing: true, while the TestPyPI step already had itworkflow_dispatchre-runs of the Release workflow (e.g., to test the fixed sigstore action) to fail with400 Bad Requestwhen the version was already on PyPIskip-existing: trueallows re-runs to proceed past the publish step so the sigstore signing step can be validatedTest plan
@v3.3.0fix now works end-to-end🤖 Generated with Claude Code
Summary by Sourcery
CI: