Skip to content

feat(release): binary + attestation release pipeline#123

Open
avrabe wants to merge 2 commits into
mainfrom
feat/release-pipeline
Open

feat(release): binary + attestation release pipeline#123
avrabe wants to merge 2 commits into
mainfrom
feat/release-pipeline

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 20, 2026

Summary

synth's first real release pipeline. The existing 4 releases (v0.1.1–v0.3.0) are release-notes only — no binary assets, no provenance, no signatures. This adds cross-platform binaries, SLSA build provenance, and Sigstore keyless signing, modeled on the sibling PulseEngine repos that already do this.

Modeled on the siblings

Studied the release workflows of three sibling repos:

  • sigil (the supply-chain-security tool) — cosign keyless (Fulcio + Rekor), SLSA, crates.io trusted publishing via OIDC. Source of this PR's permissions: block.
  • rivet (Rust-workspace CLI, closest analog) — hand-rolled target matrix, cross for aarch64-linux, SHA256SUMS.txt, cosign sign-blob over the checksums, idempotent gh release calls.
  • witness — same Rust-workspace pattern, per-asset .sig+.cert, SOURCE_DATE_EPOCH reproducibility.

synth's release.yml follows the witness/rivet Rust-CLI pattern with sigil's permissions.

What's in this PR

.github/workflows/release.yml (228 lines)

Triggered on v* tag push (plus workflow_dispatch to re-run an existing tag):

  • 4-target binary matrixx86_64/aarch64 Linux, x86_64/aarch64 macOS. aarch64-linux via cross.
  • Strip + tar.gz packaging; SHA256SUMS.txt over all assets.
  • SLSA build provenance via actions/attest-build-provenance (GitHub-native — no sibling uses the standalone SLSA generator).
  • cosign keyless signing of SHA256SUMS.txt (Fulcio cert + Rekor transparency log).
  • Idempotent gh release create/upload --clobber.
  • Permissions: contents: write, id-token: write, attestations: write.
  • Injection-safe: the workflow_dispatch tag input is bound via env: INPUT_TAG and dereferenced as $VERSION in run: blocks — never interpolated directly.
  • Release build uses only the riscv feature, not verify/z3-sys — avoids the network-fetch / temp-disk issues that the z3 dependency causes.

docs/release-process.md (207 lines)

  • How to cut a release (tag → workflow → assets).
  • The provenance + signing model + consumer verification commands (gh attestation verify, cosign verify-blob).
  • The release checklist (CHANGELOG, version bumps, green CI).
  • 5-phase rollout plan: Phase 1 binaries+checksums, Phase 2 SLSA provenance, Phase 3 cosign signing — all three implemented here. Phase 4 crates.io publishing and Phase 5 (signing synth's output ELF binaries via sigil) documented as future work.

Decisions for review

  1. No cargo-dist — none of the three siblings use it; this PR matches their hand-rolled pattern. Confirm that's the intended direction.
  2. Phase 4 (crates.io) — out of scope here. Needs either a CRATES_IO_TOKEN secret or (preferred, matching sigil) crates.io trusted publishing for the repo, plus complete metadata on all 17 workspace crates.
  3. macos-15-intel runner for x86_64-apple-darwin (sigil's choice; macos-13 is deprecated). Adjust if the org pins a different image.

Test plan

  • Workflow YAML validates (done locally — python3 yaml.safe_load; actionlint was sandbox-blocked, please run in CI).
  • First real exercise: the v0.3.1 tag (pending the in-flight PR queue) will be the first release with binaries + attestation.
  • workflow_dispatch path lets us re-run against an existing tag without re-tagging.

Scope

This PR adds the capability only — it does not bump versions or cut a release.

🤖 Generated with Claude Code

avrabe and others added 2 commits May 20, 2026 07:01
… signing

Adds .github/workflows/release.yml triggered on v* tags: cross-platform
synth CLI builds (linux x86_64/aarch64, macOS x86_64/aarch64), SHA256SUMS,
GitHub-native SLSA build provenance (actions/attest-build-provenance), and
Sigstore keyless cosign signature over SHA256SUMS. Modelled on the sibling
pulseengine/witness + rivet release workflows, with the sigil supply-chain
permissions block (contents/id-token/attestations: write).

The release build uses only the riscv feature; the verify feature (z3-sys)
is intentionally excluded to keep the build fast and network-free — the CLI
degrades gracefully without it.

docs/release-process.md documents how to cut a release, the provenance and
signing verification commands, the release checklist, the CHANGELOG mapping,
and a 5-phase rollout plan (Phases 1-3 implemented; 4 crates.io and 5 ELF
output signing via sigil noted as future work).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Aligns the macOS Intel target's runner with pulseengine/rivet and
pulseengine/witness — both Rust-workspace CLIs, the closest analogs to
synth — which build `x86_64-apple-darwin` by cross-compiling on the
arm64 `macos-14` runner. The initial draft used `macos-15-intel`
(pulseengine/sigil's choice — a native Intel runner), but the
rivet/witness majority is the better fit for a Rust CLI: the existing
build step already does `cargo build --target x86_64-apple-darwin`
with the target installed via `dtolnay/rust-toolchain`, so the arm64
host cross-compiles cleanly with no extra steps.

aarch64-apple-darwin stays on `macos-latest` (all three siblings agree).
@avrabe
Copy link
Copy Markdown
Contributor Author

avrabe commented May 20, 2026

Addressed the three review decisions:

  1. No cargo-dist — confirmed, keeping the hand-rolled matrix.
  2. Phase 4 (crates.io) — confirmed out of scope; stays documented as future work in docs/release-process.md.
  3. macOS runner — checked the siblings: rivet and witness (both Rust-workspace CLIs, the closest analogs to synth) use macos-14 for x86_64-apple-darwin; only sigil uses macos-15-intel. Pushed f50e8ce switching synth to macos-14 to match the rivet/witness majority. The build step already cross-compiles via cargo build --target x86_64-apple-darwin, so the arm64 macos-14 host handles it with no extra steps. aarch64-apple-darwin stays on macos-latest (all three siblings agree).

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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