Skip to content

feat(release): add the main + stableX.Y branch model and a backport workflow - #921

Merged
rubenvdlinde merged 2 commits into
mainfrom
feat/main-and-stable-branches
Nov 9, 2026
Merged

rubenvdlinde merged 2 commits into
mainfrom
feat/main-and-stable-branches

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Opt-in support for developing on main with stableX.Y version branches (ADR-122, hydra draft). The openregister pilot is the first caller. Every other app keeps today's behaviour until its callers pass branch-model: main.

Changes

  • release.yml, new input branch-model (default development). Under main:
    • the version comes from the branch's own appinfo/info.xml;
    • a push to main gives an unstable X.Y.0-dev.<ts> GitHub prerelease, with no bump commit and no App Store upload;
    • beta (X.Y.Z-beta.N) comes from main or stableX.Y. rc and stable come from stableX.Y only;
    • stable ships exactly the version committed in info.xml and refuses when that has a suffix or is already tagged;
    • the sync back into development is skipped.
  • release.yml, fleet-wide (both models):
    • beta uploads go out with nightly: false. The store classes them as prereleases by suffix, and its docs say prereleases published as nightly break updates;
    • a new step fails before assets attach when the tag, the tagged info.xml and the packaged info.xml disagree. Unstable under main is exempt, because it is a GitHub prerelease only.
  • branch-protection.yml, new input branch-model. Under main, any branch may target main, stableX.Y accepts backport/*, release/v*, hotfix/* and dependabot/*, and development/beta are refused.
  • backport.yml (new, reusable):
    • triggers: /backport to stableX.Y (runs on merge), /backport! to stableX.Y (runs now) or a backport stableX.Y label;
    • it cherry-picks with -x onto backport/<pr>/<target> and opens a PR. On a conflict it opens a draft with the conflicting files and the commands to finish by hand;
    • it needs write access and executes nothing from the PR. Checkout is pinned to the v4.2.2 SHA.
  • fleet-apps.json: a new main-branch list (openregister). fleet-back-merge, fleet-friday-merge and fleet-cve-release leave those apps out.

Merge timing

Callers resolve @main, so merging changes production straight away:

  • the nightly fix and the tag check apply to every app;
  • the main-branch entry stops back-merges for openregister.

So merge this at the openregister cutover, not before.

Verified locally

  • The new version step was run against a scratch repo for unstable, beta numbering, rc on main (refused), rc and stable on stable2.1, a suffix on stable (refused), the wrong line, and an existing tag.
  • backport.yml's script was run with a stubbed gh against a local bare repo: a clean squash pick, a missing target and a conflict (draft).
  • YAML parses, and shellcheck is clean apart from ${{ }} template expressions.
  • Not run: a real Actions run.

This PR was prepared with AI assistance (Claude Code) and needs human review before merge.

…orkflow

Adds an opt-in `branch-model: main` (ADR-122) to release.yml and
branch-protection.yml, a reusable backport.yml, and a `main-branch` list in
fleet-apps.json that the back-merge, Friday merge and CVE release workflows
leave out.

- release.yml: under `branch-model: main` the version comes from the
  branch's info.xml. A push to main is an unstable X.Y.0-dev.<ts> GitHub
  prerelease without a bump commit. beta X.Y.Z-beta.N comes from main or
  stableX.Y, rc and stable from stableX.Y only, and a stable release ships
  the version committed in info.xml. The sync back into development is
  skipped. Default behaviour is unchanged except for two fleet-wide fixes:
  betas upload with nightly false, and a new step fails the release when
  the tag, the tagged info.xml and the packaged info.xml disagree.
- branch-protection.yml: under `branch-model: main`, any branch may target
  main, stableX.Y accepts backport/*, release/v*, hotfix/* and dependabot/*,
  and development and beta take no pull requests.
- backport.yml: `/backport to stableX.Y`, `/backport! to stableX.Y` or a
  `backport stableX.Y` label cherry-picks the merged PR onto
  backport/<pr>/<target> and opens a PR, as a draft when it conflicts.

Assisted-by: ClaudeCode:claude-opus-5-5
…port label

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde marked this pull request as ready for review November 9, 2026 06:48
@rubenvdlinde
rubenvdlinde merged commit 9886d98 into main Nov 9, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant