Releasing¶
Releases are cut by maintainers. Publishing runs in GitHub Actions only when a GitHub release is published; nothing publishes on ordinary pushes.
One-time setup¶
- On PyPI, add a trusted publisher
for project
typoprint: owneresandorfi, repositorytypoprint, workflowrelease.yml, environmentpypi. For a first upload use a pending publisher. - In the GitHub repository, create an environment named
pypi. Optionally require a reviewer so each release needs approval. - In Settings → Pages, set the source to GitHub Actions.
No API tokens are stored in the repository.
Cut a release¶
- Update
versioninpyproject.tomland move theCHANGELOG.mdentries from Unreleased under the new version and date. - Run the checks and build locally:
bash
uv sync --locked
uv run ruff format --check .
uv run ruff check .
uv run ty check
uv run pytest
uv build
- Merge to
main, then tag and publish a GitHub release namedvX.Y.Z(the tag must matchpyproject.toml). - The release workflow rebuilds, verifies the clean wheel, publishes to PyPI, and
attaches the files to the GitHub release. The documentation site redeploys from
mainon every docs change.
Check a published version with:
uv run --no-project --with typoprint==X.Y.Z typoprint --help