From cffa8062675a3c7066956aa28b7629234e57b217 Mon Sep 17 00:00:00 2001 From: luochen570 <1160510664@qq.com> Date: Sat, 30 May 2026 21:16:55 +0800 Subject: [PATCH] ci: use fixed source path across runner steps --- .gitea/workflows/build-windows-release.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build-windows-release.yml b/.gitea/workflows/build-windows-release.yml index 1fc60e9..dfb0283 100644 --- a/.gitea/workflows/build-windows-release.yml +++ b/.gitea/workflows/build-windows-release.yml @@ -31,8 +31,10 @@ jobs: run: | $ErrorActionPreference = 'Stop' $work = Join-Path $env:RUNNER_TEMP 'chengnan-src' + $srcFixed = Join-Path $env:RUNNER_TEMP 'chengnan-work' $zip = Join-Path $env:RUNNER_TEMP 'chengnan-src.zip' if (Test-Path $work) { Remove-Item -Recurse -Force $work } + if (Test-Path $srcFixed) { Remove-Item -Recurse -Force $srcFixed } if (Test-Path $zip) { Remove-Item -Force $zip } New-Item -ItemType Directory -Force -Path $work | Out-Null @@ -44,8 +46,8 @@ jobs: $src = Get-ChildItem -Path $work -Directory | Select-Object -First 1 if (-not $src) { throw 'Source archive extraction produced no directory' } - "SOURCE_DIR=$($src.FullName)" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8 - Write-Host "Source dir: $($src.FullName)" + Copy-Item -Path $src.FullName -Destination $srcFixed -Recurse -Force + Write-Host "Source dir: $srcFixed" - name: Install MSYS2 and build dependencies shell: powershell @@ -73,7 +75,8 @@ jobs: run: | $ErrorActionPreference = 'Stop' $bash = "$env:MSYS2_ROOT\usr\bin\bash.exe" - $src = $env:SOURCE_DIR -replace '\\','/' + $srcWin = Join-Path $env:RUNNER_TEMP 'chengnan-work' + $src = $srcWin -replace '\\','/' $src = $src -replace '^([A-Za-z]):','/$1' $src = $src.ToLower() $script = @"