Skip to content

ci: release lifecycle driven by release PRs - #21

Merged
rn404 merged 4 commits into
mainfrom
release-ci
Jul 8, 2026
Merged

ci: release lifecycle driven by release PRs#21
rn404 merged 4 commits into
mainfrom
release-ci

Conversation

@rn404

@rn404 rn404 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Release lifecycle (replaces the tag-push design):

  1. Dispatch Release PR workflow (choose bump: patch / minor / major)
  2. A PR bumping cmd/sava/version.txt is created automatically, body prefilled with generated notes
  3. Edit the body as release notes; merging the PR = release approval
  4. release.yml detects 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.txt is embedded via go:embed — single source of truth, correct --version even for go install builds (no ldflags needed)
  • Seeded at v0.0.0: the first release PR with bump=minor produces v0.1.0
  • Release logic extracted to scripts/ and invoked via make with bash (no exec-permission churn); make check bundles fmt/vet/test/lint for development
  • Still only GitHub-owned actions (SHA-pinned) — no Actions allowlist changes
  • Note: the release PR is created with GITHUB_TOKEN, so no CI runs on it (diff is version.txt only; release.yml runs go test before publishing)

Test plan

  • bump logic (patch/minor/major), make check, and make release-build verified locally
  • After merging this PR: dispatch Release PR with minor → merge the generated Release v0.1.0 PR → first release is published automatically

🤖 Generated with Claude Code

rn404 and others added 2 commits July 5, 2026 23:28
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>
@rn404 rn404 self-assigned this Jul 5, 2026
- 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>
@rn404 rn404 changed the title ci: add release workflow for prebuilt binaries ci: release lifecycle driven by release PRs Jul 5, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rn404
rn404 merged commit 44dcba9 into main Jul 8, 2026
2 checks passed
@rn404
rn404 deleted the release-ci branch July 8, 2026 10:03
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