Skip to content

ci(release): GitHub Actions cuts the release from a dispatch on main - #117

Closed
Industrial wants to merge 1 commit into
mainfrom
ci/release-dispatch
Closed

Industrial wants to merge 1 commit into
mainfrom
ci/release-dispatch

Conversation

@Industrial

Copy link
Copy Markdown
Owner

Lets GitHub Actions cut a release end to end: run Publish to crates.io on main (Dry run unchecked) and it publishes every crate, verifies them, and creates the v<version> tag and the GitHub Release.

  • S6 (release authorization): a real run dispatched on main is allowed when the actor is a repo admin, GitHub verifies the HEAD commit (squash merges are GitHub-signed), and no v<version> tag points elsewhere. A pushed signed tag still works.
  • S3 (crates.io auth): trusted publishing stays the default. A crate's first version (id_effect_rpc_macros, id_effect_lints this release), or a crate without a trusted publisher yet, falls back to the existing CARGO_REGISTRY_TOKEN secret of the crates-io environment; publish-crate.sh then adds publish.yml as that crate's trusted publisher. The plan fails a real release before any upload if a new crate has no working token; a dry run warns.
  • verify uses slsa-verifier --source-branch for a dispatched run (no tag exists yet then).
  • docs/RELEASING.md updated.

Local: actionlint, shellcheck, bash -n; plan mode exercised against the live index (new crate without/with bad token → refused, dry run → warning, existing crate → publish, published version → skip). A dry-run dispatch on this branch is linked in the comments.

🤖 Generated with Claude Code

publish.yml can now do a release end to end, with no hand-pushed tag and no
owner steps on crates.io:

- S6: a real run dispatched on main is authorized when the actor is a
  repository admin, GitHub verifies the HEAD commit (squash merges are
  GitHub-signed) and no v<version> tag points elsewhere. The release job
  creates the v<version> tag on that commit with the GitHub Release; the
  verify job checks the provenance with --source-branch for such a run.
  A pushed signed tag still works as before.
- S3: trusted publishing stays the default. A crate's first version, or a
  crate whose trusted publishing is denied, falls back to the
  CARGO_REGISTRY_TOKEN secret of the crates-io environment, after which
  publish-crate.sh adds publish.yml as the crate's trusted publisher. The
  plan fails a real release before any upload when a new crate has no
  working token; a dry run warns.

docs/RELEASING.md describes the dispatch flow and the fallback.

Signed-off-by: Tom Wieland <tom.wieland@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Industrial

Copy link
Copy Markdown
Owner Author

Superseded: going back to the 0.10.1 release flow (tag push + CARGO_REGISTRY_TOKEN) instead.

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