Release and trusted publishing
Releases go to PyPI from GitHub Actions via Trusted Publishing (.github/workflows/publish.yml). No API token is stored anywhere.
One-time setup
Section titled “One-time setup”- On PyPI: project
hearthwork> Settings > Publishing > add a GitHub trusted publisher: ownerBillyMRX1, repohearthwork, workflowpublish.yml, environmentpypi. - On GitHub: Settings > Environments > New environment
pypi, with Required reviewers set to the maintainer.
Each release
Section titled “Each release”- Bump
__version__insrc/hearthwork/__init__.py, commit, and push a tag matching it, for examplegit tag v0.9.1 && git push origin v0.9.1. The workflow fails if the tag and the version differ. - Approve the
pypideployment on the workflow run in GitHub Actions.
The workflow builds with uv build, checks the distributions with twine check, then publishes with pypa/gh-action-pypi-publish.
Manual publishing with uv publish still works.