ci: release lifecycle driven by release PRs - #21
Merged
Merged
Conversation
Triggered by v* tag push. Builds darwin/linux (amd64+arm64) and windows (amd64) with version embedded via ldflags, packages tar.gz/zip with sha256 checksums, and creates a GitHub Release. Uses only GitHub-owned actions (checkout, setup-go) so no changes to the Actions allowlist are needed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- cmd/sava/version.txt is the single source of truth, embedded via go:embed (go install builds also show the correct version) - release-pr.yml (dispatch, bump: patch/minor/major): creates a PR bumping version.txt with auto-generated notes as the body - release.yml: on merge (version.txt change on main), tests, builds, tags, and publishes a Release with the merged PR body as notes - Release logic lives in scripts/ and runs via Makefile (bash invocation, no exec permission needed); Makefile also provides build/test/fmt/vet/lint/check targets for development Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
Release lifecycle (replaces the tag-push design):
cmd/sava/version.txtis created automatically, body prefilled with generated notesrelease.ymldetects the version.txt change on main: runs tests, builds darwin/linux (amd64+arm64) binaries with sha256 checksums, creates the tag, and publishes a GitHub Release using the merged PR body as notes (idempotent: skips if the tag already exists)Implementation notes:
version.txtis embedded viago:embed— single source of truth, correct--versioneven forgo installbuilds (no ldflags needed)v0.0.0: the first release PR with bump=minor producesv0.1.0scripts/and invoked viamakewithbash(no exec-permission churn);make checkbundles fmt/vet/test/lint for developmentGITHUB_TOKEN, so no CI runs on it (diff is version.txt only; release.yml runsgo testbefore publishing)Test plan
make check, andmake release-buildverified locallyminor→ merge the generatedRelease v0.1.0PR → first release is published automatically🤖 Generated with Claude Code