-
Notifications
You must be signed in to change notification settings - Fork 0
Release Process
-
develop
is thedefault
branch that should be used for development and is the one that gets dependabot updates
-
main
should be the latest release branch -
v1.x
,v2.x
should only be created from main when older versions must be maintained e.g. if a facility cannot upgrade immediately due to migrations.
When it is time to release the following steps should be followed
- Update the version within the
pyproject.toml
following https://semver.org/ - Merge develop into the appropriate release branch
- Go to the GitHub Releases section and create a new release
- Creating a new tag of the version in the form
vX.Y.Z
- Select the release branch as the target and click
Generate release notes
(Then modify as appropriate) - Ensure
Set as the latest release
is checked as appropriate - Ensure
Set as the latest release
is checked as appropriate - Click
Publish release
- Creating a new tag of the version in the form
This will trigger the release-build
action that will generate and push a new Docker image to Harbor with the tags X.Y
and X.Y.Z
.
If only updating a Docker base image (e.g. for a security update), a patch version is not required. In this case you should
- Merge the update into the appropriate release branch
- Pull the release branch locally
- Ensure any local tags have been removed e.g.
git fetch --prune --prune-tags
- Tag the release branch with the same latest tag for that release branch e.g.
git tag vX.Y.Z --force
(The force is needed as it should already exist) - Then push the tags to origin using
git push origin <release branch> --tags --force
This will trigger the release-build
action that will generate and push a new Docker image to Harbor with the tags X.Y
and X.Y.Z
. The release notes do not need updating in this case.
Warning
Do not attempt to patch a non latest patch version this way, as the X.Y
tag should point to the latest version of the minor release.
If you wish to update a Docker image or package update on a release branch that has already been merged on develop without merging all other changes on the current develop branch, use the following steps:
- Checkout a new branch to be merged into the release branch e.g.
update-dependencies
- Find the commit SHA of the update commit(s) you wish to put onto the release branch (can be found through git log or via GitHub) - Merge commits should be ignored.
- While on the new branch use
git cherry-pick commitSha1 commitSha2 ...
to copy the commits onto the new branch - Create a PR merging the new branch into the release branch