Repository navigation
feat(release): publish checkpoint-template as the crates.io canary - #508
Merged
Merged
Conversation
Publish checkpoint-template 0.1.0 to crates.io and make it the single allowlisted package, so the trusted-publishing lifecycle is exercised in production instead of remaining an empty, never-executed path. The first publication dogfood exposed four defects that an empty allowlist had hidden: - No crate shipped a LICENSE file even though every Cargo.toml listed one in `include`, so every package silently dropped its license. - The workspace metadata still carried the `Your Name` / `your-org/your-repo` / docs.rs placeholder values, which would have been baked permanently into the crates.io listing. `template_init` rewrites authors, repository, and homepage from the adopter's answers, so real baseline values do not break portability. The unreferenced `documentation` key is dropped rather than pointed at a crate that does not exist. - The release contract test demanded exit 0 from `release-publish` with no token. That only passed because the allowlist was empty; with a real package the command correctly fails closed, so the test now asserts the invocation parses (exit 2 and `unrecognized arguments` are the failure modes it exists to catch) and keeps the zero-exit requirement for config-only commands. Publishing also refuses a dirty tree, which is the correct guard: the artifact must correspond to a commit. The change is therefore committed before upload.
Contributor
Up to standards ✅🟢 Issues
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Publishes
checkpoint-template0.1.0 to crates.io and makes it the single allowlisted package, so the trusted-publishing lifecycle is exercised in production instead of remaining an empty, never-executed path.Dogfooding the first real publish surfaced four defects that an empty allowlist had hidden:
LICENSEfile, though everyCargo.tomllisted one ininclude. Every package silently dropped its license. Fixed by addingcrates/*/LICENSE.Your Name,your-org/your-repo, and adocs.rs/your-cratelink — which would have been baked permanently into the crates.io listing.template_initrewrites authors/repository/homepage from the adopter's answers, so real baseline values preserve portability. The unreferenceddocumentationkey is dropped rather than pointed at a crate that does not exist.release-publishwith no token, which only passed because the allowlist was empty. With a real package the command correctly fails closed. The test now asserts the invocation parses — exit 2 andunrecognized argumentsare the failure modes it exists to catch — and keeps the zero-exit requirement for config-only commands.mcp-server-templateis already taken on crates.io by another owner, so it is deliberately leftpublish = false.Production evidence
checkpoint-template0.1.0 (cargo publish, from a committed tree — the dirty-tree guard is correct and was respected).max_version 0.1.0,license MIT,repository https://github.com/d-oit/rust-2026-template, publisherd-oit.id=33687 d-oit/rust-2026-template workflow=release.yml environment=release.docs.rs/checkpoint-template/0.1.0builds and renders (HTTP 200)..cratenow containsLICENSE.Loaded: Some(AppState { counter: 42, name: "demo" })).release-publishis idempotent in production: re-running skips the live version and exits 0.Verification
./scripts/quality-gates.sh— all 20 checks pass.tests/trusted_publishing_contract_test.shandtests/trustpub_cli_test.shpass; non-vacuity confirmed by reverting the workflow to the broken--rootordering, which exits 2.Follow-up (cannot be done from CI)
The
releaseenvironment does not exist yet and creating it needs repository admin, so the OIDCpublish_cratesjob is still gated on that manual step before the first tagged release. Documented indocs/src/releasing/crates-io-trusted-publishing.md.