Skip to content

Instantly share code, notes, and snippets.

@peterhurford
Last active April 21, 2025 12:53
Show Gist options
  • Save peterhurford/eb7637ba7f77a63dc7032a49756d4d61 to your computer and use it in GitHub Desktop.
Save peterhurford/eb7637ba7f77a63dc7032a49756d4d61 to your computer and use it in GitHub Desktop.
How to release a new Python package

Nothing novel here, just want these instructions all in one place for my own use. Using poetry now.

1.) Ensure everything is pushed to master and is working

2.) Ensure CHANGES.md is up to date with latest

3.) Ensure version in setup.py is incremented

4.) Tag the repo - e.g., git tag 0.2 && git push origin 0.2

5.) Draft a release with the latest tag and the content from CHANGES.md

6.) Create the build - poetry build

7.) Upload to Pypi - poetry publish (Ensure you have POETRY_PYPI_TOKEN_PYPI env var set.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment