Unify Rust SDK release with publish.yml workflow#1237
Merged
stephentoub merged 4 commits intomainfrom May 9, 2026
Merged
Conversation
Fold the Rust crate into the same manual publish.yml workflow that ships Node, .NET, and Python. Retire release-plz, the two-PR flow, and the hand-curated CHANGELOG.md. Rust ships only on dist-tag=latest runs and is hard-guarded to ^0\. versions to prevent accidentally publishing 1.x while the crate is still pre-1.0. The cross-language release notes continue at vX.Y.Z; Rust gets its own scoped GitHub Release at rust/vX.Y.Z with notes auto-generated from PR titles since the previous Rust tag. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop the pre-1.0 ^0\. guard and the 'latest only' gate on the Rust publish job. Rust now follows the same dist-tag rules as Python and .NET: publish on 'latest' and 'prerelease', skip on 'unstable'. Cargo's standard semver behavior already protects stable users from prereleases — 'cargo add' and bare version requirements skip prereleases by default, so users have to opt in explicitly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
None of the other language SDKs enforce semver compatibility in CI; Rust shouldn't either. Out of step with the rest of the repo. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR folds the Rust crate’s release/publish process into the repo’s unified .github/workflows/publish.yml workflow (alongside Node, .NET, and Python), removing the Rust-only release-plz flow and moving Rust release notes to GitHub’s generated notes.
Changes:
- Add a
publish-rustjob topublish.yml, and create Rust-scoped tags/releases (rust/vX.Y.Z) during the unified release run. - Switch Rust crate versioning to a placeholder (
0.0.0-dev) that is overridden in CI at publish time. - Remove Rust-specific release-plz workflows/config/changelog and update Rust release documentation accordingly.
Show a summary per file
| File | Description |
|---|---|
rust/RELEASING.md |
Rewritten to describe the unified publish workflow, tag/release notes behavior, yanking, and emergency publish steps. |
rust/release-plz.toml |
Deleted (release-plz configuration no longer used). |
rust/README.md |
Adds a link to Rust-scoped GitHub Releases for per-version notes. |
rust/CHANGELOG.md |
Deleted (release notes now generated from PR titles / GitHub release notes). |
rust/Cargo.toml |
Sets crate version to 0.0.0-dev placeholder; removes release-plz file from excludes list. |
rust/Cargo.lock |
Updates lockfile’s local package version to match the placeholder. |
.github/workflows/rust-sdk-tests.yml |
Removes cargo semver-checks step from CI. |
.github/workflows/rust-release-pr.yml |
Deleted (Rust release PR workflow removed). |
.github/workflows/rust-publish-release.yml |
Deleted (Rust publish workflow removed). |
.github/workflows/publish.yml |
Adds Rust publish job and a Rust-scoped tag + GitHub release creation step. |
Copilot's findings
Comments suppressed due to low confidence (1)
rust/RELEASING.md:90
- Same portability issue as above:
sed -i '' ...is macOS/BSD sed-specific. Provide a Linux/GNU sed alternative or use a portable file-edit command so maintainers on Linux can restore the placeholder version reliably.
# Restore the placeholder.
sed -i '' -E 's/^version = ".*"$/version = "0.0.0-dev"/' Cargo.toml
- Files reviewed: 9/10 changed files
- Comments generated: 3
- Use 'grep -vFx' instead of 'grep -v "^TAG$"' for prev-tag lookup. Tag values contain dots that would be treated as regex metachars. - Pass --prerelease to the Rust 'gh release create' when the workflow is triggered with dist-tag=prerelease, matching how the cross-language release step is labeled. - Replace BSD-sed invocations in rust/RELEASING.md with portable 'perl -i -pe' so the manual publish steps work on both macOS and Linux. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| # Rust gets its own version-scoped GitHub Release with notes | ||
| # derived from PR titles since the previous Rust tag. The | ||
| # cross-language `vX.Y.Z` release above still exists; this one | ||
| # is the canonical reference for Rust users. |
Contributor
There was a problem hiding this comment.
We have an agent that writes release notes for the main GitHub Release after each release ships. Not a prereq for this PR but at some point it may be beneficial to use the same technique.
SteveSandersonMS
approved these changes
May 8, 2026
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.
Now that
0.1.0has shipped, fold the Rust crate into the same unifiedpublish.ymlworkflow that ships Node, .NET, and Python so we stop maintaining a separate release-plz two-PR flow and a hand-curatedCHANGELOG.md. Rust now follows exactly the same dist-tag rules as the other SDKs: publish onlatestandprerelease, skip onunstable.What changes for releases
Publish SDK packages(publish.yml) computes the shared version, then publishes Node, .NET, Python, and Rust at that version on the same run.vX.Y.Zrelease, the workflow tagsrust/vX.Y.Zand creates a Rust-scoped release with notes auto-generated from PR titles since the previous Rust tag (auto-detectsrust/v*, falls back torust-v*for the first run).CHANGELOG.md. Notes are PR-title driven, matching the other SDKs. The0.1.0curated entry is preserved at the existingrust-v0.1.0git tag.cargo addand bare version requirements skip prereleases by default; users have to opt in explicitly with e.g.version = "1.0.0-beta.4".Implementation notes
publish-rustjob pins Rust 1.94.0 (matchingrust-sdk-tests.yml), usesSwatinem/rust-cache@v2, dry-runs always, and only does the real publish onmain.rust/Cargo.tomlcarries0.0.0-devas a placeholder; CI overrides it viasedat publish time, mirroring the Node0.1.0-devpattern.rust/vX.Y.Zto match the existinggo/vX.Y.Zstyle for the Go submodule. The historicalrust-v0.1.0tag still works as the first auto-notes start point.rust-release-pr.yml,rust-publish-release.yml,rust/release-plz.toml,rust/CHANGELOG.md.cargo semver-checksfromrust-sdk-tests.yml— none of the other language SDKs enforce semver in CI, and Rust shouldn't be the odd one out.rust/RELEASING.mdrewritten as a short pointer doc covering the unified flow, Cargo prerelease semantics, yanking, and emergency manual publish.cargo publish --dry-run --allow-dirtypackages cleanly at a realistic version (0.3.0);cargo buildsucceeds at the0.0.0-devplaceholder.Next release
Trigger
publish.ymlwithdist-tag=prereleaseto ship1.0.0-beta.4across all four SDKs (Rust as a crates.io prerelease). Trigger withdist-tag=latestto ship1.0.0stable when ready.