diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index a0324c9..0d10e57 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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:" - Get-Content -Path $buildLog -Raw + if (Test-Path $buildLog) { + Get-Content -Path $buildLog -Raw + } else { + Write-Host "Build log was not created: $buildLog" + } exit $code }