feat: add PyPI publish workflow (beta + stable via OIDC)#14
Merged
Conversation
Adds a GitHub Actions publish pipeline triggered on GitHub release events. Validates tag/pyproject.toml version match and pre-release consistency, re-runs the full CI suite against the tagged SHA, builds the distribution, publishes to TestPyPI (no gate), then publishes to PyPI behind a human-approval environment gate. Authentication uses PyPI Trusted Publishers (OIDC) — no API tokens stored in GitHub Secrets. Also adds `bump`, `build`, and `publish-check` Makefile targets to support the release developer workflow locally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Step-by-step instructions for beta and stable releases, one-time PyPI Trusted Publisher and GitHub Environment setup, pipeline overview, verification steps, and the publish-check pre-flight command. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
.github/workflows/publish.yml— a four-job publish pipeline triggered onrelease: [published]eventspyproject.tomlversion, and that the pre-release flag is consistent with the version string (e.g.b/a/rcsuffix).whl+.tar.gzviapoetry build, uploads as a workflow artefactbump,build, andpublish-checkMakefile targets for the local release workflowOne-time setup required before first publish
pypi.organdtest.pypi.org: Owner=phasenexa, Repo=nexa-bidkit, Workflow=publish.yml, Environment=pypi/testpypitestpypi(no rules) andpypi(required reviewer: yourself) in Repo Settings → EnvironmentsRelease developer workflow
Pipeline:
validate → ci → build → publish-testpypi → [approval] → publish-pypiTest plan
v{current-version}b1to exercise the full pipeline end-to-endtest.pypi.org/project/nexa-bidkitshows the new versionpypienvironment gate and verifypypi.org/project/nexa-bidkitpip install nexa-bidkit==X.Y.Zb1requires--pre; stable install works without itmake publish-check tag=vX.Y.Zcatches a mismatched tag locally🤖 Generated with Claude Code