ci(release): add cargo publish step for crates.io on tag#23
Merged
saurabhjain1592 merged 2 commits intomainfrom May 5, 2026
Merged
ci(release): add cargo publish step for crates.io on tag#23saurabhjain1592 merged 2 commits intomainfrom
saurabhjain1592 merged 2 commits intomainfrom
Conversation
Mirrors the PyPI (axonflow-sdk-python) / npm (axonflow-sdk-typescript) / Maven Central (axonflow-sdk-java) publish-on-tag pattern. The new `publish-cratesio` job runs after `release` (GH release creation), so a transient crates.io outage does not erase the GH release. The job: 1. Checks the CARGO_REGISTRY_TOKEN secret is configured (fails loudly with an actionable error otherwise — generate at https://crates.io/me). 2. Runs `cargo publish`. 3. Waits 30s for registry propagation, then verifies the version is live via crates.io's public API. Order in release.yml: preflight (CHANGELOG + Cargo.toml version match) → test (cargo test + build examples) → release (GH release with extracted body) → publish-cratesio (crates.io) If CARGO_REGISTRY_TOKEN isn't set, only publish-cratesio fails — GH release is already live. Fix-forward: set the secret + run `cargo publish` locally one time, OR cut a patch tag. Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.com>
…tree integration.yml landed (PR #20) before dependabot's bumps for actions/checkout 4→6 (#13) and actions/upload-artifact 4→7 (#10) — those PRs only touched files that existed at PR-creation time. Aligning integration.yml's pins so all four workflows are on the same major versions. Pure metadata change. Signed-off-by: Saurabh Jain <saurabhjain1592@gmail.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.
Summary
Mirrors the publish-on-tag pattern from the four established SDKs (PyPI / npm / Maven Central). On every
v*tag push,release.ymlnow also publishes to crates.io.Order:
preflight— CHANGELOG section + Cargo.toml version matchtest— cargo test + build examplesrelease— GH release with the CHANGELOG bodypublish-cratesio(new) — runscargo publish+ verifies the version is liveFailure isolation:
publish-cratesioruns afterrelease. If crates.io has a transient issue, the GH release is still up — fix-forward by setting the secret + runningcargo publishlocally one time, or cutting a patch tag.Setup required before first tag
Add
CARGO_REGISTRY_TOKENas a repo secret. Generate at https://crates.io/me. Without it,publish-cratesiofails loudly with an actionable error pointing to the right URL.Test plan
yaml.safe_loadclean${{ toJSON(...) }}patternsv*tag push — only the publish-cratesio job is new; the rest of release.yml has run beforeContributor acknowledgement
ci/release-cratesio-publish