From b1ed97a82636d72e0ff731aa4265752b3c9d4158 Mon Sep 17 00:00:00 2001 From: benya Date: Sun, 15 Feb 2026 22:38:27 +0300 Subject: [PATCH] fix(ci): write build log to runner temp and enforce repo cwd - 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 --- .gitea/workflows/release.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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 }