fix(ci): add Rust to PATH on Windows runner before cargo steps
Build Lotus Chat Desktop / prepare (push) Successful in 3s
Build Lotus Chat Desktop / build-windows (push) Failing after 1m18s
Build Lotus Chat Desktop / build-linux (push) Successful in 24m31s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped

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:
2026-06-14 20:26:43 -04:00
parent a543c98ae1
commit 83725e1a2a
+12
View File
@@ -63,6 +63,18 @@ jobs:
$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');"
- 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
with:
workspaces: src-tauri