Skip to content

ci(release): run CI + Release on the release branch, never on main - #374

Merged
linhdmn merged 1 commit into
mainfrom
ci/release-branch-gating
Sep 15, 2026
Merged

linhdmn merged 1 commit into
mainfrom
ci/release-branch-gating

Conversation

@linhdmn

@linhdmn linhdmn commented Sep 15, 2026

Copy link
Copy Markdown
Member

What

Moves every GitHub Actions push trigger from main to a long-lived release branch, and documents how a release gets cut.

  • .github/workflows/ci-go.yml, app-build.yml, release.yml: push.branches: [main] → [release]
  • release.yml release-job guard: github.ref == 'refs/heads/release'
  • pull_request triggers on CI-Go stay untouched, so PRs into main are still tested
  • README: CI badge + Status section point at the release branch

Why

main is the integration line; publishing must be a deliberate act (promote main onto release):

git checkout release && git merge --ff-only origin/main && git push origin release

The branch already exists on origin, seeded from main tip + this change. No Go code changes are needed: scripts/release/nextversion computes semver from tags and HEAD, never from the branch name.

Verification

  • actionlint clean on all three workflows
  • go build ./... / go vet ./... unaffected (workflows + README only)
  • Release pipeline proven on release (run 288 → see PR comments)
  • New behavior is covered by tests — N/A: no Go logic touched; Actions triggers are not testable in this repo
  • Docs updated if user-facing — README done; PRD §17 footer left to the follow-up that records the release-line decision

Notes for reviewers

Merging this into main is the second half of the switch: until it lands, main still holds the old triggers, so a merge to main can still fire a release. origin/release already carries this commit, so the release line is live either way.

Also worth knowing: with the trigger off main, the repo's own loop driver no longer gets push CI on main — PR CI still runs, and the release branch runs the full gate set before publishing.

Push triggers move from main to a long-lived release branch:
- ci-go.yml, app-build.yml, release.yml: push branches [main] -> [release]
- release.yml release job guard: github.ref == refs/heads/release
- pull_request triggers stay on CI-Go so PRs are still tested
- README: CI badge + Status section point at the release branch

main stays the integration line; cut a release by promoting it onto
release (git merge --ff-only origin/main there). The release tooling
computes semver from HEAD and tags, not the branch name, so no Go
changes are needed.
@linhdmn
linhdmn merged commit 82ea1cc into main Sep 15, 2026
25 checks passed
@linhdmn
linhdmn deleted the ci/release-branch-gating branch September 15, 2026 03:25
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