Skip to content

ci(rust): add rust-publish.yml workflow for crates.io release (#411) - #420

Merged
gg582 merged 1 commit into
c4punks:devfrom
Bhumika-1432006:ci/rust-publish
Oct 19, 2026
Merged

gg582 merged 1 commit into
c4punks:devfrom
Bhumika-1432006:ci/rust-publish

Conversation

@Bhumika-1432006

Copy link
Copy Markdown
Contributor

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

…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
gg582 merged commit 0416ae1 into c4punks:dev Oct 19, 2026
26 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants