Release procedure¶
This page gives the steps to release version X.Y.Z from dev.
Release-please makes the release PR, the git tag and the GitHub release.
Overview¶
| Step | Who | Result |
|---|---|---|
1. Prepare dev |
Maintainer | dev passes all checks. |
2. PR dev → main |
Maintainer + second approver | One squash commit on main |
| 3. Release PR | release-please | PR with the new version and changelog |
| 4. Merge the release PR | Maintainer + second approver | Git tag vX.Y.Z, GitHub release, image tags :X.Y.Z |
| 5. After the release | Maintainer | dev contains main again |
Secret RELEASE_PLEASE_TOKEN¶
Release-please needs a PAT. With GITHUB_TOKEN, GitHub does not start other workflows for the release PR and the git tag.
Thus, the images and the required checks do not run.
The token must have these properties:
| Property | Value |
|---|---|
| Type | Fine-grained PAT |
| Resource owner | boulardlab |
| Repository access | Only boulardlab/3t-seq |
| Permission "Contents" | Read and write |
| Permission "Pull requests" | Read and write |
| Permission "Issues" | Read and write (release-please adds labels) |
| Expiration | A date. The token stops working on that date. |
The release PR has the token owner as author. Thus, the token owner cannot approve the release PR.
Replace the token¶
Do these steps before the token expires, or when release-please reports Bad credentials:
- Create a new fine-grained PAT with the properties in the table.
- If the organization requires it, ask an organization owner to approve the token.
- Run
gh secret set RELEASE_PLEASE_TOKEN --repo boulardlab/3t-seq. Paste the token. - Run
gh run rerun <run-id> --failedfor the failedrelease-pleaserun. - Write the new expiration date in your calendar.
Step 1: Prepare dev¶
- Merge all PRs for the release into
dev. - Make sure that the last CI runs on
devpassed. - If
mainhas commits thatdevdoes not have, mergemainintodev. - Make sure that the
RELEASE_PLEASE_TOKENis still valid. -
Run the dry runs for all configs:
-
Start the
e2ejob ondev:gh workflow run test.yml --ref dev. - Make sure that
e2epasses. Read its job times. See Read the job times. The nightlye2erun tests only the default branch,main.
Step 2: PR from dev to main¶
- Open the PR:
gh pr create --base main --head dev. - Give the PR a Conventional Commits title, for example
feat: 3t-seq 2.0. The title becomes the subject of the squash commit. - Wait for the checks
check,dockerfile-syncandsmoketo pass. - If GitHub says that the branch is out of date, click Update branch. Wait for the checks again.
- Ask a second maintainer to approve the PR.
- Select Squash and merge.
-
To force a version, end the commit message with this line:
-
Confirm the merge.
Release-please selects the version from the commit types.
feat gives a minor version, fix gives a patch version.
A ! after the type, or a BREAKING CHANGE: footer, gives a major version.
Use Release-As when these rules do not give the version that you want.
Step 3: Release PR¶
The push to main starts release-please.yml. Release-please opens a PR from a release-please--* branch.
The release PR changes these files:
CHANGELOG.md: a new section forX.Y.Z..release-please-manifest.json: the new version.pixi.toml: theversionline.workflow/rules/salmonTE.smk: the SalmonTE pins,salmonte:X.Y.Z.version.txt: the new version. Thesimplerelease type writes this file. The first release PR creates it.
The release PR starts these workflows:
build-salmonte.ymlbuildsghcr.io/boulardlab/3t-seq/salmonte:X.Y.Z.container-check.ymlwaits for that image.test.ymlrunssmokeandimagesin parallel.e2estarts afterimagespasses.e2eruns the full pipeline with the new SalmonTE pin.
Then do these steps:
- Read the new
CHANGELOG.mdsection in the release PR. - A squash merge gives a changelog with one entry. Edit the section to add the real release notes. Commit the edit to the release PR branch.
- Wait for the three required checks and
e2eto pass.e2eis not required, but do not merge when it fails.
Step 4: Merge the release PR¶
- Ask a maintainer who is not the token owner to approve the release PR. Alternatively, an admin can bypass the rule. Ask for approval only after the last edit. A push to the release PR removes the approvals.
- Squash-merge the release PR.
- Wait for
release-please.ymlonmain. It creates the git tagvX.Y.Zand the GitHub release. - Copy the release notes into the GitHub release body if they are missing.
The git tag vX.Y.Z starts the image workflows:
build-3t-seq.ymladds the tag:X.Y.Zto the existingenv-<hash>image.build-salmonte.ymldoes nothing, becausesalmonte:X.Y.Zexists.
Step 5: After the release¶
-
Make sure that the images exist:
-
Merge
mainback intodev: -
If
latestmust show the release, rungh workflow run build-3t-seq.yml --ref main. Seelatest. - Close the milestone and the release tracking issue.
Release 2.0.0
Issue #24 tracks the extra steps for 2.0.0. Example: close the old release PR #11.