Repository navigation
deploy: attach the published .crate to the GitHub release (closes #7434) - #14337
Merged
Merged
Conversation
With attach = True, a live github_deploy downloads <name>-<ver>.crate from crates.io, checks its sha256 against the sparse-index cksum and checks that every member is a pinned source (Cargo.toml.orig equals the pinned manifest), then uploads it with the other assets so cosign signs it and reusable-release.yml attests it. reusable-release.yml now runs the registry_deploys of a github_deploy first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t
This was referenced Nov 21, 2026
Draft
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.
Closes #7434
With
attach = True, a livegithub_deploynow downloads<name>-<ver>.cratefrom crates.io and uploads it with the other release assets, so cosign signs it andreusable-release.ymlattests the bytes crates.io serves.deploy/private/src/crates.rs:CRATES_INDEX/CRATES_DLconstants;fetch_published_cratereads the sparse-indexcksum, downloads the.crate(64 MiB cap), checks sha256, and walks the archive: every member under<name>-<ver>/,Cargo.toml.origequal to the pinned manifest,Cargo.toml/Cargo.lock/.cargo_vcs_info.jsonskipped, every other member equal to the pinned file. New typed errorsNotPublished,ChecksumMismatch,ForeignMember,Fetch,InvalidCrate.deploy/private/src/github.rs:Attestation.attach; the live run fetches attached crates intooutdir/cratesand recomputes asset names (a name collision fails); the dry run printsasset: <name>-<ver>.crate (crates.io, after crates_deploy publishes).deploy/private/github.bzl:attachis set oncratesattestations..github/workflows/reusable-release.yml:registry_deploysof the deployables run first.deploy/README.md,.github/workflows/README.md.Risks for review:
cargo publishwaits for the index to list the new version (Cargo >= 1.66).dx deploy --applyusers must runcrates_deploybeforegithub_deploy.labels(registry_deploys, deps(set(...), 1))query in a consumer withoutregistry_deploysis expected to return empty; not proven by a release run.Tests (local, linux_x86_64):
bazel test //deploy/private:dx_deploy_tools_test //deploy/private:github_attestation //deploy/private:github_unit-> 3 pass (5 newfetch_published_crate_*tests).bazel test //tools/ci:actionlint_test-> pass; actionlint onreusable-release.yml-> clean.//deploy/private:dx_deploy_tools{,_test}: no new warnings.*_consumer_testtargets (CI runs them).🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t