Skip to content

Release and Publishing

Versioning

Use semantic versioning in pyproject.toml.

Pre-release checks

  1. Update CHANGELOG.md.
  2. Run pytest -q.
  3. Build and validate package:
python -m build
python -m twine check dist/*

Publish to PyPI

  1. Create a PyPI API token.
  2. Export credentials:
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-<token>
  1. Upload:
python -m twine upload dist/*

Detailed steps are in PUBLISHING.md.

GitHub release flow

  1. Commit release changes.
  2. Tag version:
git tag v1.0.0
git push origin main --tags
  1. Create GitHub release notes from CHANGELOG.md.

Documentation release flow

GitHub Pages deploys automatically from .github/workflows/docs-pages.yml on pushes to main and manual workflow dispatch.