Fix Windows release web build
Some checks failed
Release Windows / build (push) Has been cancelled

This commit is contained in:
oliver 2026-10-12 15:56:06 +08:00
parent a5c9a8f58d
commit 5e80932c4a

View file

@ -36,13 +36,16 @@ if (-not $SkipWebBuild) {
throw "npm_not_found" throw "npm_not_found"
} }
Write-Host "==> npm build" Write-Host "==> npm build"
if (-not (Test-Path (Join-Path $webRoot "node_modules"))) { Push-Location $webRoot
& npm.cmd install --prefix $webRoot try {
& npm.cmd ci
if ($LASTEXITCODE -ne 0) { throw "npm_install_failed" } if ($LASTEXITCODE -ne 0) { throw "npm_install_failed" }
# Release packaging skips tsc (dev CI still uses `npm run build`).
& npm.cmd run build:release
if ($LASTEXITCODE -ne 0) { throw "web_build_failed" }
} finally {
Pop-Location
} }
# Release packaging skips tsc (dev CI still uses `npm run build`).
& npm.cmd run build:release --prefix $webRoot
if ($LASTEXITCODE -ne 0) { throw "web_build_failed" }
} }
if (-not (Test-Path (Join-Path $dist "index.html"))) { if (-not (Test-Path (Join-Path $dist "index.html"))) {
throw "web_dist_missing: build web/ or drop -SkipWebBuild" throw "web_dist_missing: build web/ or drop -SkipWebBuild"