From 334b8d26a5465824558fdee3426df540e1451f78 Mon Sep 17 00:00:00 2001 From: Jorge Martins <76965647+jfcmartins@users.noreply.github.com> Date: Fri, 6 Nov 2026 19:36:34 +0000 Subject: [PATCH] ci(release): bump the rc number automatically instead of pinning release-as --- docs/adr/0024-release-strategy.md | 2 +- docs/runbooks/releasing.md | 3 ++- release-please-config.json | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/adr/0024-release-strategy.md b/docs/adr/0024-release-strategy.md index 3433bef7..b57eb98c 100644 --- a/docs/adr/0024-release-strategy.md +++ b/docs/adr/0024-release-strategy.md @@ -39,7 +39,7 @@ Releases are automated; a person decides *when*, never *how*. - The existing `release.yml` (tag triggers a draft with binaries) is replaced by the release-please workflow above; its build matrix and packaging steps carry over. ## Amendment: how the pipeline is built -- `release-please-config.json` and `.release-please-manifest.json` drive it. The workspace version is read and written at `$.workspace.package.version` in `Cargo.toml`. `draft` and `prerelease` are on, so every release starts as a draft pre-release. The first release was forced to `0.1.0-rc.1` with `release-as`, removed once it shipped; later versions come from the commits. +- `release-please-config.json` and `.release-please-manifest.json` drive it. The workspace version is read and written at `$.workspace.package.version` in `Cargo.toml`. `draft` and `prerelease` are on, so every release starts as a draft pre-release. The first release was forced to `0.1.0-rc.1` with `release-as`, removed once it shipped. While the series is release candidates, `versioning: prerelease` with `prerelease-type: rc` makes each release PR bump the rc number (rc.2 to rc.3) with no config edit; `release-as` stays a one-release override, removed right after it ships. - **Cargo.lock.** CI builds with `--locked` and the lock file names each crate's version, so a version bump alone would turn CI red. A `lockfile` job refreshes it on the release branch (`cargo update --workspace`) and then **dispatches CI** on that branch, because commits and pull requests made with the workflow token don't start workflows by themselves. - **Gate.** After the release PR is merged, `verify` runs the whole CI workflow (called as a reusable workflow) on the release commit. Nothing is built until it passes. - **Binaries** for four targets, **images** built natively per architecture (no emulation) and combined into one multi-arch tag per component, a **CycloneDX SBOM** (syft), and a **deploy bundle** (compose, Terraform, dashboards, runbooks). `SHA256SUMS` covers all of them. A final job pulls each image and runs `--version`, runs the Linux CLI from the tarball, uploads the assets to the draft, and publishes it only if the repository variable `RELEASE_AUTO_PUBLISH` is `true`. diff --git a/docs/runbooks/releasing.md b/docs/runbooks/releasing.md index 6475a99c..dd34afa1 100644 --- a/docs/runbooks/releasing.md +++ b/docs/runbooks/releasing.md @@ -21,4 +21,5 @@ See [Upgrading](upgrading.md): control plane first, then proxies, then workers. ## If something fails - **No release PR appears:** the repository setting *Actions > General > Allow GitHub Actions to create and approve pull requests* must be on. - **The workflow failed after the merge:** the tag and draft release already exist. Fix the cause, then re-run the failed jobs from the Actions page. Uploads use `--clobber`, so re-running is safe. -- **Wrong version proposed:** the PR's title can't be edited by hand; add a commit with the right type, or set `release-as` in `release-please-config.json` for one release. +- **Wrong version proposed:** the PR's title can't be edited by hand; add a commit with the right type, or set `release-as` in `release-please-config.json` for one release. Remove `release-as` right after that release ships, or every later release PR proposes the same version again. +- **Going from rc to final:** set `release-as` to the final version (for example `0.1.0`) for that one release. After it ships, remove `release-as`, `versioning` and `prerelease-type`, and set `prerelease` to `false`. diff --git a/release-please-config.json b/release-please-config.json index bc491835..193d5486 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -6,11 +6,12 @@ "bump-patch-for-minor-pre-major": false, "draft": true, "prerelease": true, + "versioning": "prerelease", + "prerelease-type": "rc", "packages": { ".": { "package-name": "limen", "changelog-path": "CHANGELOG.md", - "release-as": "0.1.0-rc.2", "extra-files": [ { "type": "toml", "path": "Cargo.toml", "jsonpath": "$.workspace.package.version" }, { "type": "yaml", "path": "deploy/helm/limen/Chart.yaml", "jsonpath": "$.version" },