The Rust crate ships through the unified publish.yml workflow
alongside the other SDKs. There is no Rust-specific release workflow.
- Land your changes on
main. - Trigger the Publish SDK packages workflow
(
.github/workflows/publish.yml) viaworkflow_dispatch. - Pick
dist-tag:latest— stable release (e.g.1.0.0).prerelease— beta release (e.g.1.0.0-beta.4). Lands on crates.io as a prerelease; users must opt in with an explicit prerelease version requirement to install it.unstable— skipped for Rust (Cargo doesn't have a clean equivalent of npm'sunstabledist-tag).
- For
latestandprerelease, the workflow publishes all SDKs at the shared computed version, tagsrust/vX.Y.Zfor source traceability, and creates one combinedvX.Y.ZGitHub Release. Theunstablechannel publishes only the Node.js SDK and does not create a GitHub Release.
- Crate version: the in-tree
rust/Cargo.tomlcarries0.0.0-devas a placeholder. CI overrides it at publish time with the version computed bypublish.yml(or an explicitversionworkflow input). - Tag:
rust/vX.Y.Z(matches thego/vX.Y.Zstyle used elsewhere in this repo). The tag identifies the source used for that crate version. - Release notes: generated for the combined
vX.Y.ZGitHub Release. Write descriptive PR titles for changes that touch the Rust surface so they are represented accurately in the shared notes.
cargo add github-copilot-sdk and version = "1" requirements skip
prereleases by default. Users who want to opt in to a beta must
write an explicit prerelease requirement:
github-copilot-sdk = "1.0.0-beta.4"This matches Cargo's standard semver behavior and means a prerelease-channel publish won't surprise stable users.
If a published version contains a critical bug, yank it from crates.io to prevent new installs:
cargo yank --version X.Y.Z github-copilot-sdkYanking does not delete the version — existing Cargo.lock files
keep working — but it stops new resolutions from picking it. Follow
up with a patch release that fixes the bug, and update the combined
GitHub Release notes to explain why.
Reverse with cargo yank --undo --version X.Y.Z github-copilot-sdk
if the yank was a mistake.
If GitHub Actions is unavailable, a maintainer with crates.io credentials can publish locally:
cd rust
# Set the real version (replace X.Y.Z).
perl -i -pe 's/^version = ".*"$/version = "X.Y.Z"/' Cargo.toml
# Verify package contents.
cargo publish --dry-run
# Publish for real.
cargo publish
# Tag and push.
git tag rust/vX.Y.Z
git push origin rust/vX.Y.Z
# Restore the placeholder.
perl -i -pe 's/^version = ".*"$/version = "0.0.0-dev"/' Cargo.tomlManual publishes skip the combined GitHub Release. Create or update the
matching vX.Y.Z release after pushing the tag.