ci(release): publish a signed packslip with each release - #1379
Conversation
The release now carries `packslip.sigstore.json`: one signed document listing every archive's sha256 and sha512, the executable and man page inside it, the shared objects it loads from the host, and the build provenance of each file, signed keylessly with this workflow's OIDC identity. An installer verifies a download against the identity `github.com/jdx/usage` rather than against a signing key this project would have to hold and rotate. It needs a job of its own. build-and-publish uploads straight to the release from each runner, so no step there sees the whole release; one document covering all of it can only be written once every target has landed. `release` waits on it, so the draft is complete before it is published. `usage --usage-spec` runs against the freshly built Linux binary and its output is uploaded as `usage.usage.kdl`, listed as a `cli-spec` resource: usage is the tool that reads these specs, so publishing its own is the example the format asks for. See https://packslip.dev. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe workflow adds a tag-only ChangesCLI release publishing
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The release workflow now publishes signed inventory and CLI-spec assets before publication, with no substantiated merge-blocking issue remaining. Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant ReleaseArchives
participant GitHubRelease
participant Packslip
GitHubActions->>ReleaseArchives: Download release archives
GitHubActions->>GitHubRelease: Upload generated CLI specification
GitHubActions->>Packslip: Publish signed release resources
Packslip-->>GitHubActions: Complete packslip job
GitHubActions->>GitHubRelease: Run final release publication
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes. Shadow comparisonParsing
|
Part of adopting packslip across the jdx.dev CLIs.
Each release now publishes
packslip.sigstore.jsonbeside the archives — one signed document listing:usage,usage.exeon Windows) and theusage.1man page beside itvcruntime140.dllon Windows, nothing on Linux or macOSsigned keylessly with this workflow's OIDC identity, so an installer verifies a download against the identity
github.com/jdx/usageinstead of a signing key this project would have to hold and rotate.usage --usage-specis run against the freshly built Linux binary and uploaded asusage.usage.kdl, listed as acli-specresource. usage is the tool that reads these specs, so publishing its own is the example the format asks for.Changes
packslipjob, needingbuild-and-publish. It needs to be its own job:build-and-publishuploads straight to the release from each runner, so no step there sees the whole release, and one document covering all of it can only be written once every target has landed. It downloads the release's own archives back, generates the CLI spec, and writes the bundle.releasenow also needspackslip, so the draft is complete before it is published. Both jobs carry the samestartsWith(github.ref, 'refs/tags/v')guard, so the dispatch path is unchanged.Verification
Rehearsed end to end against the real v6.6.1 release: downloaded all seven assets, ran
usage --usage-specfrom the linux-gnu build (456 lines), and created a bundle.The universal macOS build correctly comes out with no
arch, so it matches either one.zizmor --offlinereports no findings on the changed workflow.🤖 Generated with Claude Code
Note
Medium Risk
Changes release gating and adds OIDC/attestation permissions plus third-party release uploads; a packslip failure would block publishing the release.
Overview
Adds a
packslipjob topublish-cli.ymlthat runs on version tags afterbuild-and-publish, because matrix runners upload assets independently and only a follow-up job can see the full release.That job re-downloads all
usage-*.tar.gz/usage-*.zipassets, extracts the Linux GNU binary to emitusage.usage.kdlviausage --usage-specand uploads it to the release, then runsjdx/packslip@v0.3.0to publish a keyless OIDC-signed inventory (packslip.sigstore.json) covering archive digests, theusagebinary, bundledusage.1, and the CLI spec as acli-specresource.The final
releasejob nowneeds: packslipas well asenhance-release, so the draft is not marked published until the packslip (and spec asset) are on the release.Reviewed by Cursor Bugbot for commit 12793a7. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit