Skip to content

Latest commit

 

History

History
71 lines (50 loc) · 1.59 KB

RELEASING.md

File metadata and controls

71 lines (50 loc) · 1.59 KB

Release Process

Signing key: https://lgrahl.de/pub/pgp-key.txt

  1. Check the code:

    flake8 .
    isort -c . || isort --df .
    mypy setup.py tests examples threema
    py.test
  2. Set variables:

    export VERSION=<version>
    export GPG_KEY=3FDB14868A2B36D638F3C495F98FBED10482ABA6
  3. Update version number in threema/gateway/__init__.py and CHANGELOG.rst, also update the URL with the corresponding tags.

    Run python setup.py checkdocs.

  4. 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}
  5. 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
  6. 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
  7. Upload package to PyPI and push:

    twine upload "dist/threema.gateway-${VERSION}*"
    git push
    git push --tags
  8. Create a new release on GitHub.

  9. Prepare CHANGELOG.rst for upcoming changes:

    `Unreleased`_ (YYYY-MM-DD)
    --------------------------
    
    ...
    
    .. _Unreleased: https://github.com/threema-ch/threema-msgapi-sdk-python/compare/<VERSION>...HEAD
  10. Pat yourself on the back and celebrate!