Repository navigation
ci: publish the crates to crates.io after pypi - #104
Merged
Merged
Conversation
A release now publishes lance-csr-catalog and lance-csr from the same workflow run, once the PyPI upload succeeds, through crates.io trusted publishing and the protected crates-io environment. Packaging and verification run before the 30-minute token is requested.
Deploying lance-csr with
|
| Latest commit: |
764fb94
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://edbfa33e.lance-csr.pages.dev |
| Branch Preview URL: | https://ci-publish-crates.lance-csr.pages.dev |
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.
Why
Publishing the crates was a manual step after every release: wait for PyPI to show the new version, then run
cargo publishfrom a laptop with a long-lived crates.io token. This moves it into the release workflow, so one GitHub release puts the version on both registries.What changed
publish-cratesjob runs after the PyPIpublishjob succeeds. It is skipped on pull requests and dry runs, the same aspublish.rust-lang/crates-io-auth-action), so the repository stores no crates.io token. Both crates now have a trusted publisher registered forpython-publish.ymland thecrates-ioenvironment. That environment only acceptsv*tags, likepypi.cargo packagebuilds and verifies both crates before the token is requested, because compiling lance can take close to the token's 30-minute lifetime.cargo publish --no-verifythen only uploads. Cargo publisheslance-csr-catalogbeforelance-csr.lance-csrby hand.Validation
cargo package --locked -p lance-csr-catalog -p lance-csrpasses locally, verifyinglance-csragainst the packaged catalog (3.5 min on a 10-core Mac; I estimate 10 to 15 min on a GitHub runner).cargo publish --locked --no-verify --dry-runwith the same packages uploads in the right order.typospasses on the changed docs; the workflow YAML parses.cargo publishstill works, since Require trusted publishing is left off on crates.io until a CI release has succeeded.🤖 Generated with Claude Code