Release Process#
Start preparing the PR that drafts the release notes. This involves manually scanning all of the merged and appropriately milestoned PRs with an “enhancement” label, so that we don’t miss mentioning new features. For other merged PRs and closed issues (i.e., bug fixes), the
tools/gh_lists.pyscript will capture them in a raw list. The list of authors in the release notes may be populated by runningtools/authors.pyscript over the appropriate commit range. If there are new authors in this release, you may also need to adjust.mailmapaccordingly to avoid duplication, other issues. Try to add 2-3 new summary “highlights” at the top of the release notes for each release. Do not merge the release notes PR intomainbranch until you are ready to proceed with the release process proper.Start preparing the PR to bump the
mainbranch to the next version number, but DO NOT merge it until: the above release notes PR has been merged, the newmaintenancebranch has been pushed up.maintenancebranches are named following this convention:maintenance/0.1.xfor the0.1.xrelease series,maintenance/0.2.xfor the0.2.xrelease series, and so on. This allows bug fixes to be backported to maintenance branches while themainbranch continues to gain new features.After pushing the new
maintenancebranch up, that branch may need backport PR(s) for dependency version pins (upper bounds to avoid future breaks), fixups to release notes, etc.As our project is currently small with few consumers, we will not use release candidates at this time, and will proceed directly with feature releases. As a precaution, try to work in a Python environment with the minimum version of each dependency when performing the release process.
Adjust the version number to remove the trailing
.dev0inpyproject.toml.Now create a release commit similar to i.e.,
REL: GFDL 0.1.0 release commitbased on the current release version, but DO NOT push it yet.Tag the release locally with
git tag -s <v0.x.y>(the-sensures the tag is signed–make sure you are properly setup for signing tags).Continue with building release artifacts.
Since we are currently a pure Python project, go ahead and build the source distribution and binary (wheel) locally:
python -m build. If that succeeds, go ahead and push the release commit to the GFDL repo.Now, start uploading release artifacts (you may need to ask for appropriate permissions if you are a new release manager). For PyPI, upload first the portable wheel, and then the sdist.
twine upload /path/to/*.whland thentwine upload /path/to/*.tar.gz. For the GitHub releases, use the GUI at lanl/GFDL to create a release and upload all release artifacts. At this stage you can push up the release tag so that it may be used for the GitHub release:git push origin v0.1.0.Update the deployed documentation following the release.
For now, we will only announce the release within our small team by email with a short message and a copy of the release notes.
After the release is done, forward port relevant changes to release notes, build scripts, author name mapping, and tools scripts that were only made on the
maintenancebranch back tomain.Finally, after the release, create a PR against the
maintenancebranch to draft the release notes skeleton for the next bug fix release on that branch, and bump to the nextyin the version number (0.x.y.dev0) inpyproject.toml.