- Update version in
setup.cfg
, usually by remove.dev
- Check that CHANGES.rst describes all changes since the last version
- Replace
unreleased
with today'sYYYY-MM-DD
in CHANGES.rst - Commit and tag
git add .
git commit -m 'prepare for release'
git tag v0.15
- Bump version in
setup.cfg
and append.dev
- Add new section in CHANGES.rst e.g.
0.16 (unreleased)
-----------------
- No changes yet
- Commit dev version: and checkout tag as detached head:
git add .
git commit -m 'back to work'
- Checkout tag as detached head and upload to pypi:
git checkout v0.15
python setup.py sdist
twine upload dist/*
- Finally, push the changes and go back to the main branch:
git checkout master
git push --tags
git push
If you are doing this for the first time, you might need to conda install twine
and
save credentials in .pypirc.