ci(release): run CI + Release on the release branch, never on main - #374
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves every GitHub Actions push trigger from
mainto a long-livedreleasebranch, and documents how a release gets cut..github/workflows/ci-go.yml,app-build.yml,release.yml:push.branches: [main]→[release]release.ymlrelease-job guard:github.ref == 'refs/heads/release'pull_requesttriggers on CI-Go stay untouched, so PRs into main are still testedWhy
main is the integration line; publishing must be a deliberate act (promote main onto
release):The branch already exists on origin, seeded from main tip + this change. No Go code changes are needed:
scripts/release/nextversioncomputes semver from tags andHEAD, never from the branch name.Verification
actionlintclean on all three workflowsgo build ./.../go vet ./...unaffected (workflows + README only)release(run 288 → see PR comments)Notes for reviewers
Merging this into main is the second half of the switch: until it lands,
mainstill holds the old triggers, so a merge to main can still fire a release.origin/releasealready 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.