Skip to content

Creating a release

Jeffrey Gill edited this page Jul 21, 2019 · 44 revisions
  1. Gather closed issues and pull requests related to the release into a GitHub milestone:

    https://github.com/jpgill86/neurotic/milestones

  2. Create a branch called "release-X.X.X" using the real release number.

  3. In the docs, add a change log entry referencing each notable PR and issue (remember to add a link from releasenotes.rst!)

  4. In setup.py, set IS_RELEASED = True and set the new version number.

  5. Commit these changes to the branch with the message "Release X.X.X" and open a pull request.

  6. Wait for all tests to pass:

    https://travis-ci.com/jpgill86/neurotic

  7. Merge the pull request, then verify that the new release notes built correctly:

    https://neurotic.readthedocs.io/en/latest/releasenotes.html

  8. If all is well, tag the PR merge commit with the release number and push the tag to GitHub.

  9. Mark the new release as an active version on Read the Docs so that an archive of the docs for the current version are available in the future even after later releases:

    https://readthedocs.org/projects/neurotic/versions/

  10. On your local machine, delete any old build directories:

    cd neurotic
    rm -rf build dist neurotic.egg-info
    
  11. Build for distribution:

    python setup.py sdist bdist_wheel
    
  12. Upload the build artifacts to PyPI's test server:

    twine upload --repository-url https://test.pypi.org/legacy/ dist/*
    
  13. Verify the test release looks OK:

    https://test.pypi.org/project/neurotic/

  14. If all is well, upload to the official PyPI server (THIS CANNOT BE UNDONE OR OVERWRITTEN):

    twine upload dist/*
    
  15. Verify the official release looks OK:

    https://pypi.org/project/neurotic/

  16. In setup.py, set IS_RELEASED = False and increment the version number to the next minor release.

  17. Commit these changes with the message "After release" and push to GitHub.

  18. Create a GitHub release from the pushed tag containing the release notes:

    https://github.com/jpgill86/neurotic/tags

  19. Close the milestone and create a new one for the next minor release:

    https://github.com/jpgill86/neurotic/milestones

Clone this wiki locally