Commit 45c1890
committed
ci: replace tag-triggered SDK publish with release-plz
The previous rust-sdk-release.yml triggered `cargo publish` on `rust-sdk-v*`
tags, but the tag version (e.g. rust-sdk-v0.5.9) was decoupled from the actual
crate version in Cargo.toml (0.1.2). Pushing a tag failed with "already exists
on crates.io index", and there was no way to retry once one of the two
serial publishes succeeded.
release-plz manages this end-to-end:
- on every push to master, opens/updates a single Release PR that bumps
versions in Cargo.toml, updates workspace dependency pins, and regenerates
per-crate CHANGELOGs based on commits since last release
- merging the PR auto-tags each crate (dstack-sdk-v*, dstack-sdk-types-v*)
and publishes to crates.io in dependency order, idempotently
- semver-check warns if a change should bump major
- OIDC trusted publishing (id-token: write) replaces the static token flow;
no CARGO_REGISTRY_TOKEN secret needed
release-plz.toml uses an allowlist: workspace defaults to release = false
so only dstack-sdk and dstack-sdk-types are managed; all other internal
crates are protected from accidental publish.
Follow-up: crates.io trusted publisher entries need to be re-pointed from
rust-sdk-release.yml to release-plz.yml for both crates (Settings → Trusted
Publishers on each crate's page).1 parent 40eaf35 commit 45c1890
2 files changed
Lines changed: 66 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | | - | |
| 13 | + | |
| 14 | + | |
11 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
12 | 40 | | |
13 | 41 | | |
| 42 | + | |
| 43 | + | |
14 | 44 | | |
15 | 45 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments