Repository navigation
Description
Goal
Automatically create and maintain one release-preparation PR from Conventional Commits, then publish only when a human merges that PR.
The human decision is simple: review and merge the generated release PR. The automation owns version selection, release-note drafting, tag creation, artifact publication, and post-publication verification.
Why this design
- GoReleaser is the sole publisher of GitHub Release metadata, archives, and checksums.
- SVU is only the small Go tool that determines the next semantic version from commits since the latest tag.
- A custom workflow owns the release PR because this is a single-module Go CLI with repository-specific safety gates.
- The workflow that publishes must create the tag and invoke GoReleaser in the same job. Do not rely on a tag created by one GitHub Actions workflow to trigger another workflow.
- Do not add Release Please, Node, npm, semantic-release, or a second release publisher.
Proposed lifecycle
A fix/feature PR merges to main
↓
Release-prep workflow calculates the candidate with SVU
↓
It creates or updates exactly one open release PR
↓
A human reviews and merges that release PR
↓
Publish workflow validates the merged candidate, tags it, then runs GoReleaser in the same job
1. Automatically maintained release PR
Create a workflow triggered by pushes to main that:
- Checks out
mainwith complete tag history (fetch-depth: 0). - Installs a pinned SVU version.
- Uses
svu nextto determine whether unreleased Conventional Commits require a version. - Does nothing if no release-worthy commit exists.
- Otherwise creates or updates one bot-owned release branch and PR, titled
chore(release): vX.Y.Z. - Generates deterministic release notes covering commits since the previous tag and updates
CHANGELOG.mdin that PR. - Marks the PR clearly as generated release preparation and records the candidate version, base tag, and base commit in its body.
- Updates the existing open generated PR instead of opening duplicate PRs after additional eligible merges.
- Ensures release-preparation commits do not themselves cause SVU to increment a version.
The generated PR is the reviewable human gate. It has a real, useful diff: the reviewed changelog/release notes that correspond to the public GitHub Release.
2. Publish after human merge
Create a separate publish workflow triggered only when the generated release PR is merged. It must:
- Check out the resulting
mainmerge commit and require complete tag history. - Recompute and validate the expected candidate version from the previous tag and the released commit range.
- Validate the generated PR metadata/release notes agree with that candidate. Refuse publication if the PR was stale, tampered with, or does not represent current
main. - Validate the candidate is a new
vX.Y.Ztag and no tag or GitHub Release already exists for it. - Run canonical Go gates: module verification, tests with race detector, vet, build, source smoke test, and native archive verification.
- Create and push an annotated tag only after every gate passes.
- Invoke GoReleaser in that same job to create the GitHub Release and upload the six archives plus checksums.
- Download the published macOS arm64 archive, validate its checksum, inspect archive paths, and verify
partiful --versionequals the candidate version. - Emit a concise GitHub Actions summary with version, commit SHA, release URL, asset names, and verification result.
Version boundary
This issue depends on #238. After that work, dev is the final fallback only: GoReleaser injects the immutable release version, tagged go install resolves the module version, and the supported local build command injects git describe metadata. The generated release PR does not rewrite product source or broad test snapshots.
Safety requirements
contents: writeis limited to the release-prep and publish workflows.- Release-prep may only create or update its designated branch/PR and
CHANGELOG.md. - Publish may only run for a merged generated release PR targeting
main. - Refuse to tag a non-
maincommit. - Refuse an existing tag or existing release instead of overwriting it.
- Do not publish if any verification gate fails.
- Do not use a PAT solely to make a tag trigger a second workflow. The publish job owns tag creation and GoReleaser execution together.
- Retire or make mutually exclusive the existing tag-triggered publisher before enabling this workflow. Never allow two workflows to publish the same tag.
- Dependabot remains separate and is not involved in application-version selection or publication.
Acceptance criteria
-
fix:commits yield a patch candidate,feat:yields a minor candidate, and Conventional Commit breaking-change syntax yields a major candidate. - A qualifying merge to
maincreates a release-prep PR without manual dispatch. - Further qualifying merges update that same open release-prep PR; they do not create duplicates.
- The generated PR contains deterministic release notes and identifies its candidate version and base tag.
- Merging the generated PR is the only human release approval step.
- A successful publish creates exactly one tag, exactly one GitHub Release, six platform archives, and one checksum file.
- Existing-tag/release, stale-PR, and failed-gate paths create no new public release artifact.
- The published arm64 archive checksum and executable version are verified by the workflow.
- The workflow uses no Node/npm release dependency.
Dependency
Blocked by #238. Implement and merge that prerequisite first.
Activity
[-]feat(release): add deterministic SVU and GoReleaser release dispatch[/-][+]feat(release): automatically prepare an SVU and GoReleaser release PR[/+]KalebCole commentedon Nov 14, 2026
Triage bot: fits the Go-only release path, no hold. Publishing stays gated on a human merging the release PR, and no Node or npm in the release workflow.