Repository navigation
ci: publish GitHub Releases only from main - #5
Merged
Merged
Conversation
Fail the release job when a v* tag is not an ancestor of origin/main, then wait for the ci workflow on that SHA before GoReleaser. Read the Go version from go.mod. Document how to cut a release.
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.
Why
v0.4.0published twice on 2026-08-17. The first run tagged feature-branch SHAdcc54e6while PR #4 was still open (and lint was red). The second run retagged the squash-merge onmain.Tag-push events do not include a source branch, so
branches: [main]cannot express this.What
release.yml: fail loudly ifGITHUB_SHAis not an ancestor oforigin/main, then wait up to 20 minutes forci.ymlon that SHA, then GoReleaser.ci.yml/release.yml:setup-goreadsgo.modinstead of a hardcoded 1.26.6.CONTRIBUTING.md: how to cut a release (tag the main/squash commit, not the feature-branch SHA).Beads:
squad-h7s.1. No admin override. No tag ruleset.Test plan
CI on this PR is the
go-version-filecheck.Do not push a real product tag from this branch.
Safe checks after merge:
Local ancestor check (no publish):
Feature SHA after a squash must be non-zero;
origin/mainmust be zero.Negative live test (after this is on
main): tag a commit that is not onmainwith a throwaway name such asv0.0.0-guard-test, push the tag, confirm the release job goes red on the ancestor step and GoReleaser does not run, then delete that tag (it never published).Happy path: next real
v*on themainSHA afterciis green — same as today's cut, with the wait-for-ci step.