Releases are Git tags named vX.Y.Z. Users pin the tag through rev: in their .pre-commit-config.yaml, so the tag
must point at a commit that already contains the version bump and the changelog entry.
-
Start from an up-to-date
main(or a branch that will be merged intomainbefore tagging). -
Choose the new version following Semantic Versioning.
-
Update
CHANGELOG.md:- Rename the
[Unreleased]entries into a new## [X.Y.Z] - YYYY-MM-DDsection and leave an empty## [Unreleased]above it. - Update the link references at the bottom:
[Unreleased]comparesvX.Y.Z...HEAD, and add[X.Y.Z]comparing the previous tag withvX.Y.Z.
- Rename the
-
Set
versioninpyproject.tomltoX.Y.Z. -
Run
uv lockso themps-pre-commit-hooksentry inuv.lockgets the new version. -
Update
rev:in the usage example inREADME.mdtovX.Y.Z. -
Run the checks:
uv run pytest
-
Commit as
Bump version to X.Y.Z, push, and merge tomain. -
Tag the merge commit on
mainand push the tag:git tag -a vX.Y.Z -m "Release X.Y.Z" git push origin vX.Y.Z
Never move or delete a tag after pushing it, since users may already have it cached. If a tag was created too early, release the next patch version instead and mention it in the changelog.