ci: add release workflow and document the release procedure#130
Merged
Conversation
Add .github/workflows/release.yml. Pushing a tag matching v<major>.<minor>.<patch> (or ...rc<N>) runs the workflow with four gated jobs: 1. verify — pytest, ruff, mypy on the tagged commit 2. build — python -m build produces sdist + wheel 3. publish-pypi — uploads to PyPI via trusted publishing (OIDC, no long-lived token in the repo). Requires the `pypi` GitHub environment for approval gating. 4. github-release — attaches sdist + wheel to the GitHub release page with auto-generated release notes from PRs since the previous tag Add docs/releasing.md for maintainers. It covers: - One-time PyPI trusted-publishing setup (pending publisher registration on PyPI side + `pypi` environment on GitHub side with required reviewer) - Per-release checklist (CHANGELOG cut-over, version bump in pyproject.toml + __init__.py + cli.py + README, release-prep PR, tag, verify on PyPI) - Recovery procedures for failed publishes, including the PyPI "no re-upload of the same version" constraint Link the procedure from CONTRIBUTING.md. Closes #114
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
Adds `.github/workflows/release.yml` and `docs/releasing.md`. Pushing a tag matching `v..` (or `…rc`) runs four gated jobs in sequence:
One-time setup you'll need to do before the first real tag
The workflow is dormant until two things are configured:
On PyPI (one-time, ~3 minutes):
On GitHub (one-time, ~1 minute):
Both steps are in `docs/releasing.md` so future maintainers find them too.
Rehearsal before v0.1.0
Once those are configured, we can rehearse with a release candidate tag like `v0.1.0rc1` (the workflow accepts `rcN` suffixes). PyPI treats RC versions as pre-releases. If it works, we tag `v0.1.0` for the real release.
Test plan
Closes #114