Skip to content

Make the crates publishable, and document where the token goes - #4

Merged
Zenofex merged 1 commit into
mainfrom
chore/enable-crates-io
Sep 26, 2026
Merged

Zenofex merged 1 commit into
mainfrom
chore/enable-crates-io

Conversation

@Zenofex

@Zenofex Zenofex commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

cargo install bootintel-cli was blocked by two things that are not credentials, so a token alone would not have worked.

publish = false. It was on crates/cli to satisfy cargo-deny's wildcard-dep check, because bootintel-detectors was a bare path dependency. The real fix is to give that dep both a path and a version: cargo uses the path locally and the version when packaging. cargo deny check still reports advisories, bans, licenses and sources all ok.

Publish order. The library must be on the index before the binary crate can be packaged. Reproduced: cargo package -p bootintel-cli fails with no matching package named bootintel-detectors. The new publish-crates job publishes the library, waits for index consistency, then publishes the binary crate.

The token. Opt-in behind a publish_crates dispatch input, and the job refuses to start without CARGO_REGISTRY_TOKEN, pointing at the exact settings page. That guard matters because the failure is unrecoverable: a crates.io version can be yanked but never reused, so a half-publish would burn 0.4.0 for good.

docs/releasing.md documents the process, token scopes, and why the Homebrew line stays unadvertised until the tap exists. No install claim was added that does not work yet, which is the mistake that left three advertised channels as dead ends.

Also refreshed four stale cli-v0.3.1 references in the README.

cargo install bootintel-cli was impossible for two reasons that had nothing
to do with credentials, so handing over a token alone would not have worked.

crates/cli carried publish = false, with a comment explaining it existed to
satisfy cargo-deny's wildcard-dep check because bootintel-detectors was
declared as a bare path dependency. The actual fix is to give that dependency
both a path and a version: cargo uses the path locally and the version when
packaging. Verified that cargo deny still reports advisories, bans, licenses
and sources all ok afterwards, so the workaround is no longer earning its
keep.

The ordering is not optional and is easy to get wrong once: the library must
be on the index before the binary crate can be packaged, otherwise cargo
fails with "no matching package named bootintel-detectors". Reproduced here.
The new publish-crates job does them in order and waits for the index to
become consistent in between.

The job is opt-in behind a publish_crates dispatch input and refuses to start
without CARGO_REGISTRY_TOKEN, with an error naming the exact settings page.
That check exists because the failure it prevents is unrecoverable: a
crates.io version can be yanked but never reused, so a half-publish would
burn 0.4.0 permanently.

docs/releasing.md records the whole process, including the token scopes and
the reason the Homebrew line must not be advertised before the tap exists. No
install claim was added that does not work yet, which is the mistake that made
three advertised channels dead ends in the first place.

Also refreshed four stale cli-v0.3.1 references in the README, including the
GitHub Action pin and the attestation-verify example.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Zenofex
Zenofex merged commit f2dc889 into main Sep 26, 2026
11 checks passed
@Zenofex
Zenofex deleted the chore/enable-crates-io branch September 26, 2026 08:21
@Zenofex Zenofex mentioned this pull request Sep 26, 2026
Zenofex added a commit that referenced this pull request Sep 26, 2026
Makes the published crate match its tag.

The publishability fix (#4) landed after `cli-v0.4.0` was already tagged
and released. Publishing under 0.4.0 would have put a crate on crates.io
whose contents differed from the tag and the release archives, and since
a crates.io version can be yanked but never reused, that divergence
would be permanent. 0.4.1 is the first version where the tag, the
binaries and the crate are all the same code.

No user-visible behaviour change, so PATCH per the policy in
CHANGELOG.md.

One detail worth flagging: the version pin on the `bootintel-detectors`
path dependency has to track the workspace version. Bumping only the
workspace would leave `crates/cli` asking the index for 0.4.0 while
publishing 0.4.1.

Verified locally: 274 tests pass, `cargo deny check` reports advisories,
bans, licenses and sources all ok, rustfmt clean, and `cargo package -p
bootintel-detectors` succeeds.

After merge: dispatch `cli-release` with version `0.4.1` and
`publish_crates` checked.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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