Add automated semver + CI + binary release workflows#25
Merged
Conversation
CI runs `go vet`, `go build`, `go test -race` on every PR and push to main. A successful run on main triggers the release workflow, which reads the merged PR's `release:*` label (default `patch`), computes the next semver tag, builds a static linux/amd64 binary, pushes the tag, and publishes a GitHub release with auto-generated notes. Replaces the previous tag-triggered release in `go.yml` with a fully automated PR-label-driven flow.
The tag-triggered build/release flow is replaced by the PR-label-driven release.yml.
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.
Summary
Sets up automated semver + CI + binary release for this repo:
ci.ymlrunsgo vet,go build, andgo test -raceon every PR and on every push tomain.release.ymlchains off a successful CI run onmain: it reads the merged PR'srelease:*label, computes the next semver tag, builds a staticlinux/amd64binary (find-replace-linux-amd64), pushes the tag, and publishes a GitHub release with auto-generated notes.go.ymlis removed; its tag-triggered build/release flow is replaced by the PR-label-drivenrelease.yml.codeql-analysis.ymlandgolangci-lint.ymlare left alone.Version-bump labels
Apply exactly one to a PR (default is
release:patchif none set):release:majorrelease:minorrelease:patchrelease:skipPrecedence:
skip>major>minor>patch. Direct pushes tomain(no PR) fall back torelease:patch.Behavior changes vs. the old
go.ymlgit push origin vX.Y.Z; they now fire automatically after a PR merge tomain, based on the merge commit's PR label. The next tag is computed from the latest existing tag, so the first merge after this PR cuts a patch bump by default.find-replace(no arch suffix); the new workflow publishesfind-replace-linux-amd64. Anything pulling the latest release asset will need its URL updated.README.mdas the release body; now auto-generated from PR titles + commit messages since the previous tag (viagh release create --generate-notes --notes-start-tag).go vet/go build ./.../go test -race ./...directly instead of invoking./build.sh.Test plan
mainand cuts the next patch tag withfind-replace-linux-amd64attached.release:minorcuts a minor bump.release:skipproduces no new tag.