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
mainbranch and pull all recent changes to your local copy. - Create a new branch on the
mainbranch, and name itrelease_X.Y. Checkout the newly created branch. - Bump the version number in
VERSIONtovX.Y.0(do not forget thevon the version number). - Update the changelog in
docsrc/source/changelog.rst, using the previous release's changelog as a template. - Push the
release_X.Ybranch to GitHub.
On the GitHub repository:
- Open a new pull request (PR) to merge the
patch_X.Ybranch into themainbranch. 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.Ybranch and pushing them to GitHub. - Once the PR can be merged, do so, using the notation
Preparing release vX.Y.0for the merge commit message. - Go to the
Codetab of the GitHub repository. In the right column, underReleases, click onCreate a new release. - Under
Select target, choose themainbranch. - Under
Releasetitle, typevX.Y.0based on the new version number. - Under
Describethis release, copy-paste the changelog for the new version. - Click the
Publish releasebutton 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_TOKENsecret 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
Codetab of the GitHub repository. In the top middle left of the screen click thex branchesbutton, there click on theNew branchbutton. - Create a new branch by setting the
Branch namefield torelease\vX.Yand selectmainas theBranch source. - The release of version
vX.Yis complete.
On your local copy:
- Create a new branch based on the corresponding
release\vX.Ybranch, and name itpatch_X.Y.Z. Checkout the newly created branch. - Make the necessary changes (or cherry-pick the necessary commits from the
mainbranch) and commit them to thepatch_X.Y.Zbranch. - Update the changelog in
docsrc/source/changelog.rst, using the previous release's changelog as a reference. - Bump the version number in
VERSIONtovX.Y.Z(do not forget thevon the version number). - Push the
patch_X.Y.Zbranch to GitHub.
On the GitHub repository:
- Open a new pull request (PR) to merge the
patch_X.Y.Zbranch into therelease/vX.Ybranch. 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.Zbranch and pushing them to GitHub. - Once the PR can be merged, do so, using the notation
Release vX.Y.Zfor the merge commit message. - Go to the
Codetab of the GitHub repository. In the right column, underReleases, click onCreate a new release. - Under
Select target, choose the corresponding branchrelease/vX.Y. - Under
Releasetitle, typevX.Y.Zbased on the new version number. - Under
Describethis release, copy-paste the changelog for the new version. - Click the
Publish releasebutton 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_TOKENsecret for authentication. On a parallel workflow, the documentation will be built and deployed to thegh_pagesbranch. - 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.Zis complete.