You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update release workflow and documentation to read the Rust toolchain
version from rust-toolchain.toml and pass it explicitly to the
dtolnay/rust-toolchain action. This ensures the workflow uses a single
source of truth for the Rust version and avoids implicit action
behavior.
Copy file name to clipboardExpand all lines: .agents/skills/smbcloud-cli-release/SKILL.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,9 @@ The npm CLI detects the GitHub OIDC environment automatically and exchanges it f
140
140
141
141
When cross-compiling in CI, the Rust toolchain used for `rustup target add` must match the toolchain used by `cargo build`.
142
142
143
-
For this repo, check `rust-toolchain.toml` first and keep the workflow matrix aligned with it.
143
+
For this repo, `rust-toolchain.toml` is the source of truth.
144
+
145
+
Do not duplicate the Rust version in the matrix unless the workflow intentionally tests multiple toolchains.
144
146
145
147
If the workflow installs a target for one toolchain but Cargo builds with another, CI can fail with:
146
148
@@ -149,13 +151,23 @@ If the workflow installs a target for one toolchain but Cargo builds with anothe
149
151
150
152
This can happen even when `rustup target add <target>` already ran successfully.
151
153
152
-
Preferred pattern:
154
+
### dtolnay action behavior
155
+
156
+
For the pinned `dtolnay/rust-toolchain` revision used in this repo, do not assume the action will infer the toolchain from `rust-toolchain.toml` without input.
157
+
158
+
A workflow can fail with:
159
+
160
+
-`'toolchain' is a required input`
161
+
162
+
Preferred pattern in this repo:
153
163
154
-
- install the requested toolchain explicitly
155
-
- run `rustup target add <target> --toolchain <toolchain>`
156
-
- run `cargo +<toolchain> build --target <target>`
164
+
- read `channel = "..."` from `rust-toolchain.toml`
165
+
- write it to `RUST_TOOLCHAIN` in `GITHUB_ENV`
166
+
- pass `toolchain: ${{ env.RUST_TOOLCHAIN }}` to `dtolnay/rust-toolchain`
167
+
- run `rustup target add <target> --toolchain ${{ env.RUST_TOOLCHAIN }}`
168
+
- run `cargo build --target <target>` after the action sets that toolchain active
157
169
158
-
Do not rely on plain `cargo build` if the repo pin in `rust-toolchain.toml`can differ from the matrix toolchain version.
170
+
This keeps `rust-toolchain.toml`as the only Rust version source while avoiding implicit action behavior.
0 commit comments