fix(ci): add Rust to PATH on Windows runner before cargo steps
cargo.exe lives in %USERPROFILE%\.cargo\bin but act does not automatically export it into the CI subprocess PATH. Added an explicit step to append that directory to GITHUB_PATH, matching what the Linux job already does for $HOME/.cargo/bin. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,18 @@ jobs:
|
|||||||
$ver = '${{ needs.prepare.outputs.version }}'
|
$ver = '${{ needs.prepare.outputs.version }}'
|
||||||
node -e "const fs=require('fs');const d=JSON.parse(fs.readFileSync('src-tauri/tauri.conf.json','utf8'));d.version='$ver';fs.writeFileSync('src-tauri/tauri.conf.json',JSON.stringify(d,null,2),'utf8');"
|
node -e "const fs=require('fs');const d=JSON.parse(fs.readFileSync('src-tauri/tauri.conf.json','utf8'));d.version='$ver';fs.writeFileSync('src-tauri/tauri.conf.json',JSON.stringify(d,null,2),'utf8');"
|
||||||
|
|
||||||
|
- name: Add Rust to PATH
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$cargoDir = "$env:USERPROFILE\.cargo\bin"
|
||||||
|
if (Test-Path $cargoDir) {
|
||||||
|
Add-Content -Path $env:GITHUB_PATH -Value $cargoDir
|
||||||
|
Write-Host "Added $cargoDir to GITHUB_PATH"
|
||||||
|
} else {
|
||||||
|
Write-Error "Rust not found at $cargoDir — install rustup on this runner first"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
workspaces: src-tauri
|
workspaces: src-tauri
|
||||||
|
|||||||
Reference in New Issue
Block a user