Release and Publishing¶
Versioning¶
Use semantic versioning in pyproject.toml.
Pre-release checks¶
- Update
CHANGELOG.md. - Run
pytest -q. - Build and validate package:
python -m build
python -m twine check dist/*
Publish to PyPI¶
- Create a PyPI API token.
- Export credentials:
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-<token>
- Upload:
python -m twine upload dist/*
Detailed steps are in PUBLISHING.md.
GitHub release flow¶
- Commit release changes.
- Tag version:
git tag v1.0.0
git push origin main --tags
- 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.