Replace x.y.z with the new version throughout. Steps 1-3 only edit
files; make them on a release branch.
-
Update the version number in
pyproject.tomlandCargo.toml(the two must match). -
Update
CHANGELOG.md:- Promote
[Unreleased]to a new[x.y.z] - YYYY-MM-DDsection. - Update the comparison links at the bottom.
- Promote
-
Regenerate
Cargo.lock:cargo generate-lockfile
This bumps the
phonorsentry tox.y.zand may also refresh transitive dependencies to their latest compatible versions, so sanity-check that it still compiles before committing:cargo check --release
(A plain
cargo buildfails to link locally because the pyo3 extension needs the Python interpreter symbols; the wheels are built with maturin in CI, not with barecargo build.) -
Commit on a release branch and open a PR:
git switch -c release/vx.y.z git add pyproject.toml Cargo.toml Cargo.lock CHANGELOG.md git commit -m "Release vx.y.z" git push origin release/vx.y.zMerge the PR once CI is green.
-
Tag the merged commit on
mainand push the tag:git switch main && git pull git tag vx.y.z git push origin vx.y.zPushing a
v*tag triggers the release workflow (.github/workflows/release.yml), which builds wheels and the sdist for all supported platforms. -
Approve the PyPI upload. The
publish-pypijob runs in thepypiGitHub environment, which has a required reviewer, so the run pauses at that job. Open the run in the Actions tab, click "Review deployments", and approvepypi. The wheels are built but never uploaded until this approval is given. -
Verify the release: check the new version on https://pypi.org/project/phonors/ and
pip install phonorsin a fresh virtualenv. -
conda-forge updates itself. A bot opens a PR against
conda-forge/phonors-feedstockreferencing the new PyPI sdist within a few hours; review and merge it (fix the recipe first if the dependencies changed).
- A TestPyPI rehearsal is available before tagging: trigger the
workflow manually (
gh workflow run release.yml --ref main, or Actions -> Release -> "Run workflow").workflow_dispatchpublishes to TestPyPI; only av*tag publishes to PyPI.