-
Notifications
You must be signed in to change notification settings - Fork 9
Creating a release
-
Gather closed issues and pull requests related to the release into a GitHub milestone:
-
Create a branch called "release-X.X.X" using the real release number.
-
In the docs, add a change log entry referencing each notable PR and issue (remember to add a link from
releasenotes.rst
!) -
In
setup.py
, setIS_RELEASED = True
and set the new version number. -
Commit these changes to the branch with the message "Release X.X.X" and open a pull request.
-
Wait for all tests to pass:
-
Merge the pull request, then verify that the new release notes built correctly:
-
If all is well, tag the PR merge commit with the release number and push the tag to GitHub.
-
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:
-
On your local machine, delete any old build directories:
cd neurotic rm -rf build dist neurotic.egg-info
-
Build for distribution:
python setup.py sdist bdist_wheel
-
Upload the build artifacts to PyPI's test server:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
-
Verify the test release looks OK:
-
If all is well, upload to the official PyPI server (THIS CANNOT BE UNDONE OR OVERWRITTEN):
twine upload dist/*
-
Verify the official release looks OK:
-
In
setup.py
, setIS_RELEASED = False
and increment the version number to the next minor release. -
Commit these changes with the message "After release" and push to GitHub.
-
Create a GitHub release from the pushed tag containing the release notes:
-
Close the milestone and create a new one for the next minor release: