Add tag-triggered release workflow with static musl binary #11
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/release"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #7
What
Pushing a SemVer tag
vX.Y.ZorvX.Y.Z-<pre>builds a fully static x86_64 musl binary, smoke-tests it, and publishes a Forgejo release withsporah-X.Y.Z-x86_64-linux.tar.gz(binary, README, LICENSE, completions) plusSHA256SUMS. A release only runs when the tag equalsCargo.toml's version and the commit is on master. Tags with a-are marked as pre-releases.reqwest switches from native-tls to rustls (no OpenSSL) and trusts both the system CA store and bundled webpki roots. The README gets a download/verify/install snippet.
Blast radius
Tier: trunk (the repo has no CLAUDE.md "Blast radius" list, so everything is trunk)
Trunk paths touched:
.forgejo/workflows/release.yml,Cargo.toml,Cargo.lock,README.mdGate / rollback: the workflow only runs on SemVer tag pushes, so nothing happens until a tag is pushed. To undo, revert this merge, and delete a bad release and its tag in Forgejo. Re-running on the same tag replaces that release's assets (
override: true).Proof
cargo fmt --checkok;cargo clippy --locked --all-targets -- -D warningsok;cargo test --locked9 passed;cargo auditexit 0 (one allowed "unsound" warning foranyhow, via wasm-only deps).rust:1-bookworm:ldd: "statically linked" and--version:sporah-cli 0.1.0;city Berlincall prints bars;sporah,README.md,LICENSE,completions/_sporahandcompletions/sporah.bash, andSHA256SUMSis written.busybox:1.36(no/etc/ssl): a live HTTPS fetch exits 0, so the bundled roots work without a system store.workflowpattern(the matcher Forgejo uses):v0.1.0,v10.20.300,v0.2.0-rc1,v1.0.0-beta.2;viktor,v1,v0.1,v1.2.3.4,va.b.c,v1.2.3rc1,1.2.3.v0.1.0ok;v0.2.0andv0.1fail.prereleaseandoverride(needs a real tag andRELEASE_TOKEN);Review
Reviewers (all fresh-context, using the
code-reviewmethod):github.repository; sccache off.RUSTC_WRAPPER=""overrides the image'sENV RUSTC_WRAPPER=sccache.prerelease, so they never become "latest"; a 30 s timeout on the live call.override: true(makes re-runs safe); the ancestry gate doesn't check CI status (documented); the grep depends on the "request failed" message text.Review-Confidence: 45/100. "The workflow logic was reviewed well at high and then medium, with local simulations covering most steps. But the publish/prerelease step and the ancestry gate have never run, and the CI-passed gate is only a comment. Do a dry-run
-rc1tag release on master before relying on this."Confidence by part
forgejo-release,prerelease,RELEASE_TOKEN): low. Never exercised. It needs the repo secretRELEASE_TOKENwithwrite:repositoryscope. A firstv0.1.0-rc1tag (withCargo.tomlset to match) would exercise it as a pre-release.Merge with "Create merge commit" so the
Review-Confidencetrailers survive.🤖 Generated with Claude Code
WIP: Add tag-triggered release workflow (static musl binary)to Add tag-triggered release workflow with static musl binary@ -0,0 +6,4 @@on:push:tags:- "v*"Would this be triggered if one pushed a tag like "viktor" or similar as well? If so, would be better to specify more specifically if possible which tags trigger the build. We want to follow Semver, so the format should be relatively predictable.
Re the
v*trigger ("viktor"): yes, it would have started a run, which then failed at the Cargo.toml version check. Fixed inbfd98a6. The trigger is now SemVer only:I checked this with nektos/act's
workflowpattern, the matcher Forgejo uses:v0.1.0,v10.20.300,v0.2.0-rc1,v1.0.0-beta.2.viktor,v1,v0.1,v1.2.3.4,va.b.c,v1.2.3rc1,1.2.3.The follow-up review found that pre-release tags would have been published as full releases and become "latest". a923ccd now marks tags that contain
-asprerelease.