fix(ci): write build log to runner temp and enforce repo cwd
Some checks failed
Desktop CI / tests (push) Successful in 15s
Desktop Release / release (push) Failing after 2m34s

- run build step from git toplevel directory

- store build.log under %RUNNER_TEMP% to avoid missing dist path

- guard log dump when file is absent
This commit is contained in:
2026-02-15 22:38:27 +03:00
parent 5be8ab9af7
commit b1ed97a826

View File

@@ -119,13 +119,22 @@ jobs:
PYTHONIOENCODING: "utf-8"
run: |
$ErrorActionPreference = "Continue"
$buildLog = "dist/build.log"
New-Item -ItemType Directory -Force -Path "dist" | Out-Null
$repoRoot = (git rev-parse --show-toplevel).Trim()
if (-not [string]::IsNullOrWhiteSpace($repoRoot)) {
Set-Location $repoRoot
}
$logDir = Join-Path $env:RUNNER_TEMP "anabasis-build"
New-Item -ItemType Directory -Force -Path $logDir | Out-Null
$buildLog = Join-Path $logDir "build.log"
python build.py *>&1 | Tee-Object -FilePath $buildLog
$code = $LASTEXITCODE
if ($code -ne 0) {
Write-Host "Build failed with exit code $code. Dumping build log:"
if (Test-Path $buildLog) {
Get-Content -Path $buildLog -Raw
} else {
Write-Host "Build log was not created: $buildLog"
}
exit $code
}