Signing key: https://lgrahl.de/pub/pgp-key.txt
-
Check the code:
flake8 . isort -c . || isort --df . mypy setup.py tests examples threema py.test
-
Set variables:
export VERSION=<version> export GPG_KEY=3FDB14868A2B36D638F3C495F98FBED10482ABA6
-
Update version number in
threema/gateway/__init__.py
andCHANGELOG.rst
, also update the URL with the corresponding tags.Run
python setup.py checkdocs
. -
Do a signed commit and signed tag of the release:
git add threema/gateway/__init__.py CHANGELOG.rst git commit -S${GPG_KEY} -m "Release v${VERSION}" git tag -u ${GPG_KEY} -m "Release v${VERSION}" v${VERSION}
-
Build source and binary distributions:
rm -rf build dist threema.gateway.egg-info find . \( -name \*.pyc -o -name \*.pyo -o -name __pycache__ \) -prune -exec rm -rf {} + python setup.py sdist bdist_wheel
-
Sign files:
gpg --detach-sign -u ${GPG_KEY} -a dist/threema.gateway-${VERSION}.tar.gz gpg --detach-sign -u ${GPG_KEY} -a dist/threema.gateway-${VERSION}*.whl
-
Upload package to PyPI and push:
twine upload "dist/threema.gateway-${VERSION}*" git push git push --tags
-
Create a new release on GitHub.
-
Prepare CHANGELOG.rst for upcoming changes:
`Unreleased`_ (YYYY-MM-DD) -------------------------- ... .. _Unreleased: https://github.com/threema-ch/threema-msgapi-sdk-python/compare/<VERSION>...HEAD
-
Pat yourself on the back and celebrate!