fix(ci): set cargo PATH inline in Build step
Build Lotus Chat Desktop / prepare (push) Successful in 8s
Build Lotus Chat Desktop / build-windows (push) Failing after 14m12s
Build Lotus Chat Desktop / build-linux (push) Successful in 23m37s
Build Lotus Chat Desktop / update-manifest (push) Has been skipped

GITHUB_PATH written by a prior step is not reliably picked up by act
(the local runner). Set PATH directly in the Build step's PowerShell
session so cargo.exe is visible to tauri build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-14 23:33:37 -04:00
parent fd565e1edc
commit f70f749216
+4 -22
View File
@@ -63,27 +63,6 @@ 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: |
$candidates = @(
"$env:USERPROFILE\.cargo\bin",
"C:\Users\$env:USERNAME\.cargo\bin"
)
$added = $false
foreach ($dir in $candidates) {
if (Test-Path "$dir\cargo.exe") {
Add-Content -Path $env:GITHUB_PATH -Value $dir
Write-Host "Added $dir to GITHUB_PATH"
$added = $true
break
}
}
if (-not $added) {
Write-Error "cargo.exe not found - install rustup on this runner"
exit 1
}
- uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
@@ -109,7 +88,10 @@ jobs:
CARGO_HTTP_MULTIPLEXING: 'false'
# Retry transient network errors before failing.
CARGO_NET_RETRY: '5'
run: npm run tauri -- build --bundles nsis
run: |
$env:PATH = "C:\Users\$env:USERNAME\.cargo\bin;$env:PATH"
cargo --version
npm run tauri -- build --bundles nsis
- name: Upload to release
shell: powershell