- Export the necessary environment variables:
# Examples: '0.8.0', '0.8.0rc1', '0.8.0b1'
export VERSION={VERSION BEING RELEASED}
# See `gpg -k`
export GPG={YOUR GPG}
- Update version numbers to match the version being released:
vim -p src/result/__init__.py CHANGELOG.md
- Update diff link in CHANGELOG.md (see example):
vim CHANGELOG.md
- Do a signed commit and signed tag of the release:
git add src/result/__init__.py CHANGELOG.md
git commit -S${GPG} -m "Release v${VERSION}"
git tag -u ${GPG} -m "Release v${VERSION}" v${VERSION}
- Build source and binary distributions:
rm -rf ./dist
python3 -m build
- Upload package to PyPI:
twine upload dist/result-${VERSION}*
git push
git push --tags
- Optionally check the new version is published correctly
- Update version number to next dev version (for example after
v0.9.0
this should be set to0.10.0.dev0
:
vim -p src/result/__init__.py