Repository navigation
CI: publish blktrace-rs to crates.io when its version changes - #153
Merged
Merged
Conversation
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
Runs on master pushes that touch blktrace-rs/Cargo.toml, compares the crate version with the latest published one on crates.io, and publishes when they differ. Uses trusted publishing (RFC 3691): the auth action exchanges the workflow's GitHub OIDC identity for a short-lived crates.io token that is revoked when the job ends, so no registry token is stored as a repository secret. Assisted-by: Claude:glm-5.3 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
imlk0
force-pushed
the
publish-blktrace-rs
branch
from
October 15, 2026 08:51
dac8bac to
61cae5c
Compare
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
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.
What
Adds a workflow that publishes the blktrace-rs crate to crates.io
automatically whenever its version on master differs from the latest
published version.
How it works
blktrace-rs/Cargo.toml(a versionbump always does), compares the version against the crates.io API, and
publishes with
cargo publish -p blktrace-rsonly when they differ.repository secret. The
rust-lang/crates-io-auth-actionstep exchangesthis workflow's GitHub OIDC identity for a short-lived crates.io token
(granted by
permissions: id-token: write), which cargo consumes viaCARGO_REGISTRY_TOKENand which is revoked when the job ends.libclang-devbecausecargo publishruns a verificationbuild, and the crate's build-time bindgen step needs it.
One-time setup on crates.io (maintainer)
The crate's initial 0.1.0 is already published manually. For the trusted
publisher to be authorized, add a Trusted Publisher configuration on the
crates.io blktrace-rs settings page with:
openanoliscryptpilotpublish-blktrace-rs.ymlUntil that configuration exists, a version bump would fail the publish
job on master; afterwards every bump publishes automatically.