feat(release): publish sdist + wheel to PyPI on tag push#6
Merged
Conversation
Adds two jobs to the release workflow so every v* tag also lands the
package on PyPI alongside the binary GitHub Release:
- build-dist: builds sdist + wheel with `python -m build`, verifies
the tag version appears in the filenames, and runs `twine check`
before uploading as an artifact.
- publish-pypi: gated by the `pypi` GitHub environment; downloads
the artifact and uploads via pypa/gh-action-pypi-publish using the
PYPI_API_TOKEN repository secret.
The existing `release` job now filters downloaded artifacts to
`agentrun-*` so it doesn't pick up python-dist.
Setup required once per repo:
- Create a PyPI project-scoped API token for `agentrun-cli` and add
it as the `PYPI_API_TOKEN` Actions secret.
- (Optional, recommended) Configure the `pypi` environment with
required reviewers so every publish needs manual approval.
Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Adds two jobs to the release workflow so every v* tag also lands the package on PyPI alongside the binary GitHub Release:
python -m build, verifies the tag version appears in the filenames, and runstwine checkbefore uploading as an artifact.pypiGitHub environment; downloads the artifact and uploads via pypa/gh-action-pypi-publish using the PYPI_API_TOKEN repository secret.The existing
releasejob now filters downloaded artifacts toagentrun-*so it doesn't pick up python-dist.Setup required once per repo:
agentrun-cliand add it as thePYPI_API_TOKENActions secret.pypienvironment with required reviewers so every publish needs manual approval.