- Finish work, committing all changes. Check you've got no uncommitted changes before following this list:
git status
- Merge any remote changes to master:
git pull
- Run the tests to ensure you're not releasing broken functionality:
tox
- Edit HISTORY.rst to add a summary of what's changed in this new release:
vim HISTORY.rst
- Check your RST documentation is still valid
python setup.py checkdocs
- Commit the updated changelog:
git commit -am "Changelog for upcoming release"
- Update version number (can also be minor or major) - this immediately creates a new commit and new tag!
bump2version patch
- Install the package again for local development, but with the new version number:
python setup.py develop
- Run the tests again to ensure everything still works after installation:
tox
- Delete old releases to not attempt to re-upload these to PyPI:
rm dist/*
- Build new releases for PyPI in both the legacy source-only sdist format, and modern wheel format:
python setup.py sdist bdist_wheel
- Check the reStructuredText documentation will render correctly on PyPI after being uploaded by Travis:
twine check dist/*
- Push the new commits, and the new tag created by bumpversion. This only works because
bump2version(fork ofbumpversioncreates annotated tags, so you can push them along with the commits in a single command:
git push --follow-tags
-
Wait for Travis to run a successful build and upload the new release to PyPi: https://travis-ci.org/beveradb/pysonofflan
-
Check the PyPI listing page (e.g. https://pypi.org/project/pysonofflan/) to make sure that the README, release notes, and roadmap display properly.
-
Edit the release on GitHub (e.g. https://github.com/beveradb/pysonofflan/releases). Paste the release notes into the release's release page, and come up with a title for the release.
** Not currently needed, but would be just before the git push if we weren't using Travis to upload builds to PyPi:
Upload to PyPi with Twine (credentials in ~/.pypirc): twine upload dist/*
Travis is configured (in .travis.yml) to upload new versions to PyPi itself after a successful build.