- Update code
- Update version number in
setup.py
orsetup.cfg
- Commit all changes:
git commit -a
- Tag the current state with version number:
git tag X.Y.Z
- Push changes to remote:
git push --tags
- Build source distribution:
python setup.py sdist bdist_wheel
- Release to PyPi:
twine upload dist/*
- Update GitHub release with notes and other stuff
Notes on packaging and publishing: https://packaging.python.org/tutorials/packaging-projects/