Releases are published to PyPI automatically via GitHub Actions using trusted publishing.
- Update
CHANGELOG.md-- move items from "Unreleased" into a new version section with today's date - Bump
__version__inwatchman/__init__.py(this is the single source of version truth) - Commit the changes:
git commit -am "Release X.Y.Z" - Tag the commit:
git tag X.Y.Z - Push the commit and tag:
git push origin main --tags - Create a GitHub Release from the tag -- paste the changelog entry as the release notes
- The publish workflow will automatically run CI, build the package, publish to PyPI, and attach the artifacts to the release
If GitHub Actions isn't available or working for some reason, you can publish locally:
- Check the dist locally:
just dist - Publish the release:
just release
To enable automated publishing, the repository maintainer needs to configure trusted publishing:
- Go to the django-watchman PyPI project settings
- Add a new "Trusted Publisher" with:
- Owner:
mwarkentin - Repository:
django-watchman - Workflow name:
publish.yml - Environment name:
pypi
- Owner:
- In the GitHub repository settings, create an environment named
pypi(optionally with deployment protection rules for an approval gate)