These are a collection of instructions to release major and patch package updates. They must be followed sequentially.
On your local copy:
- Ensure all the necessary changes have been merged into the
main
branch and pull all recent changes to your local copy. - Create a new branch on the
main
branch, and name itrelease_X.Y
. Checkout the newly created branch. - Bump the version number in
VERSION
tovX.Y.0
(do not forget thev
on the version number). - Update the changelog in
docsrc/source/changelog.rst
, using the previous release's changelog as a template. - Push the
release_X.Y
branch to GitHub.
On the GitHub repository:
- Open a new pull request (PR) to merge the
patch_X.Y
branch into themain
branch. Be sure to specify at least one reviewer for the PR. - Wait for all checks to pass. If any errors occur, fix them by making additional changes on the
release_X.Y
branch and pushing them to GitHub. - Once the PR can be merged, do so, using the notation
Preparing release vX.Y.0
for the merge commit message. - Go to the
Code
tab of the GitHub repository. In the right column, underReleases
, click onCreate a new release
. - Under
Select target
, choose themain
branch. - Under
Release
title, typevX.Y.0
based on the new version number. - Under
Describe
this release, copy-paste the changelog for the new version. - Click the
Publish release
button to create the new tag and publish the release. This will trigger a GitHub Action that will automatically build and upload the package wheels to PyPI, using thePYPI_API_TOKEN
secret for authentication. - Confirm that the package has been released in the PyPI repository.
- Confirm that the documentation has been properly built and online.
- Go to the
Code
tab of the GitHub repository. In the top middle left of the screen click thex branches
button, there click on theNew branch
button. - Create a new branch by setting the
Branch name
field torelease\vX.Y
and selectmain
as theBranch source
. - The release of version
vX.Y
is complete.
On your local copy:
- Create a new branch based on the corresponding
release\vX.Y
branch, and name itpatch_X.Y.Z
. Checkout the newly created branch. - Make the necessary changes (or cherry-pick the necessary commits from the
main
branch) and commit them to thepatch_X.Y.Z
branch. - Update the changelog in
docsrc/source/changelog.rst
, using the previous release's changelog as a reference. - Bump the version number in
VERSION
tovX.Y.Z
(do not forget thev
on the version number). - Push the
patch_X.Y.Z
branch to GitHub.
On the GitHub repository:
- Open a new pull request (PR) to merge the
patch_X.Y.Z
branch into therelease/vX.Y
branch. Be sure to specify at least one reviewer for the PR. - Wait for all checks to pass. If any errors occur, fix them by making additional changes on the
patch_X.Y.Z
branch and pushing them to GitHub. - Once the PR can be merged, do so, using the notation
Release vX.Y.Z
for the merge commit message. - Go to the
Code
tab of the GitHub repository. In the right column, underReleases
, click onCreate a new release
. - Under
Select target
, choose the corresponding branchrelease/vX.Y
. - Under
Release
title, typevX.Y.Z
based on the new version number. - Under
Describe
this release, copy-paste the changelog for the new version. - Click the
Publish release
button to create the new tag and publish the release. This will trigger a GitHub Action that will automatically build and upload the package wheels to PyPI, using thePYPI_API_TOKEN
secret for authentication. On a parallel workflow, the documentation will be built and deployed to thegh_pages
branch. - Confirm that the package has been released in the PyPI repository.
- Confirm that the documentation has been properly built and online.
- The release of version
vX.Y.Z
is complete.