You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci(release): publish to crates.io on tag via trusted publishing #204
Part of the 2026-10-24 launch plan (step 1b). Umbrella: #41. Companion: the Cargo.toml issue filed alongside this one.
What
Add a publish-crate job to .github/workflows/release.yml so a v* tag also publishes to crates.io. Today the file says (line 69-70) "injection-scanner ships binaries only -- there is NO crates.io publish job".
Constraints that already bind this file
Public repo → GitHub-hosted runner only (CLAUDE.md §CI / Self-Hosted Runners, docs/RELEASE-CHECKLIST.md §7). Do not touch runs-on.
The pipeline uses no org secrets, only GITHUB_TOKEN. A long-lived CARGO_REGISTRY_TOKEN would break that rule, so use crates.io Trusted Publishing (OIDC) via rust-lang/crates-io-auth-action; the workflow already has id-token: write for the SLSA attestation.
Trusted publishing can only be configured on crates.io after the crate exists. So v0.3.0 is published once by hand from the tagged commit, the trusted publisher is configured, and the CI job proves itself from v0.3.1 on.
How
publish-crate:
name: Publish to crates.ioneeds: [release] # only after the binaries are up and verifiedruns-on: ubuntu-latestpermissions:
id-token: writecontents: readsteps:
- uses: actions/checkout@<pinned sha>
- uses: dtolnay/rust-toolchain@<pinned sha>
- id: authuses: rust-lang/crates-io-auth-action@<pinned sha>
- run: cargo publish --lockedenv:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
Pin every action by SHA like the rest of the file. Keep continue-on-error: false: a failed publish should be visible, but it runs after release, so it can never block the binaries.
Done when
release.yml comment at line 69-70 updated; job present; actionlint clean.
v0.3.0 is on crates.io (manual publish), trusted publisher configured for UnityInFlow/injection-scanner + release.yml.
cargo install injection-scanner works on a clean machine and prints injection-scanner 0.3.0.
Activity
hermanngeorge15 commentedon Oct 24, 2026
Tracking issue: #211. Plan document:
docs/reviews/2026-10-24-launch-plan.md.hermanngeorge15 commentedon Oct 25, 2026
Implemented in draft PR #212 (
launch/v0.3.0-packaging). Verified locally; see the PR body for what is blocked on the org Actions allowlist.