PyPI Release Checklist¶
First-Time Setup (One-Time)¶
-
Create a PyPI account at pypi.org if you don't have one.
-
Go to your PyPI account > Publishing > Add a new pending publisher.
-
Fill in the form:
- PyPI Project Name: Your package name (e.g.,
my-package) - Owner: Your GitHub username or organization
- Repository name: Your repo name
- Workflow name:
publish.yml -
Environment name:
pypi -
If you opted into successful GitHub setup, the post-generation hook created the
pypienvironment. Otherwise, go to Settings > Environments > New environment and name itpypi. Optionally add required reviewers and restrict deployment tov*tags. -
Run
just releaseto trigger the publish (see below).
During Development¶
Record user-visible changes in CHANGELOG/unreleased.md as they merge to
main. Keep versioned changelog files reserved for releases.
Every Release¶
-
Bump the version and commit it:
-
Run the release command:
just release moves CHANGELOG/unreleased.md to
CHANGELOG/X.Y.Z.md, creates a fresh unreleased file, commits and pushes
that release-notes commit, then creates and pushes the vX.Y.Z tag.
- GitHub Actions builds, signs with Sigstore, and publishes to PyPI automatically.
Older generated projects that already contain only
CHANGELOG/X.Y.Z.md remain compatible with just release.
Release Recovery¶
If release preparation fails before the tag is created, inspect the working tree and finish or revert the release-notes commit before retrying. Never reuse or overwrite an existing tag.
Troubleshooting¶
If the publish fails:
- Check that your PyPI trusted publisher settings match your workflow exactly
- Verify the tag format matches what PyPI expects (e.g.,
v1.0.0) - Look at the GitHub Actions logs for detailed error messages