Repository navigation
ci(rust): add rust-publish.yml workflow for crates.io release (#411) - #420
Merged
Merged
Conversation
…s#411) Adds .github/workflows/rust-publish.yml with two jobs: - dry-run: runs on every PR touching bindings/rust/; calls cargo publish --dry-run for both cwist-sys and cwist so a packaging problem is caught before a tag is cut. - publish: runs on rust-v* tag push; verifies the tag semver matches both Cargo.toml versions, runs cargo test, publishes cwist-sys, waits 30 s for crates.io index propagation, then publishes cwist. Uses CARGO_REGISTRY_TOKEN from repo secrets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gg582
pushed a commit
that referenced
this pull request
Oct 20, 2026
…420) Adds .github/workflows/rust-publish.yml with two jobs: - dry-run: runs on every PR touching bindings/rust/; calls cargo publish --dry-run for both cwist-sys and cwist so a packaging problem is caught before a tag is cut. - publish: runs on rust-v* tag push; verifies the tag semver matches both Cargo.toml versions, runs cargo test, publishes cwist-sys, waits 30 s for crates.io index propagation, then publishes cwist. Uses CARGO_REGISTRY_TOKEN from repo secrets. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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 #411.
cwist/cwist-sys 0.2.0 was published manually. This adds
.github/workflows/rust-publish.yml so future releases go through CI.
Two jobs:
dry-run (pull_request, paths: bindings/rust/**): runs
cargo publish --dry-run for both crates against an installed
libcwist so a packaging or dependency problem is caught before
a tag is cut. Also fires on workflow_dispatch for ad-hoc checks.
publish (push, tags: rust-v*): checks out the repo, builds and
installs libcwist, then verifies that the semver extracted from
the tag matches the version field in both Cargo.toml files.
Fails here if they diverge so no crate is published with the
wrong version. Runs cargo test, publishes cwist-sys, waits 30 s
for crates.io index propagation, then publishes cwist. Both
publish steps use CARGO_REGISTRY_TOKEN from repo secrets.
The 30 s wait matches the crates.io documentation guidance for
sequential publishes where one crate depends on the other.
🤖 Generated with Claude Code