ci: package from fixed runner temp path
Some checks failed
Build Windows Release / Build Windows x64 Release (push) Failing after 25s
Some checks failed
Build Windows Release / Build Windows x64 Release (push) Failing after 25s
This commit is contained in:
@@ -89,17 +89,7 @@ jobs:
|
|||||||
mkdir -p dist-windows/chengnan
|
mkdir -p dist-windows/chengnan
|
||||||
cp build-windows/chengnan.exe dist-windows/chengnan/
|
cp build-windows/chengnan.exe dist-windows/chengnan/
|
||||||
/ucrt64/bin/windeployqt6.exe --release --no-translations dist-windows/chengnan/chengnan.exe || /ucrt64/bin/windeployqt.exe --release --no-translations dist-windows/chengnan/chengnan.exe
|
/ucrt64/bin/windeployqt6.exe --release --no-translations dist-windows/chengnan/chengnan.exe || /ucrt64/bin/windeployqt.exe --release --no-translations dist-windows/chengnan/chengnan.exe
|
||||||
cat > dist-windows/chengnan/README.txt <<'EOF'
|
printf '%s\n' 'chengnan Windows x64 package' '' 'Usage:' '1. Extract the whole directory.' '2. Double-click chengnan.exe to run.' '' 'Note:' '- This package is built by Windows Runner with MSYS2 UCRT64 + Qt.' '- Do not copy chengnan.exe alone; keep DLLs and Qt plugin directories together.' > dist-windows/chengnan/README.txt
|
||||||
chengnan Windows x64 发布包
|
|
||||||
|
|
||||||
运行方式:
|
|
||||||
1. 解压整个目录。
|
|
||||||
2. 双击 chengnan.exe 运行。
|
|
||||||
|
|
||||||
说明:
|
|
||||||
- 本目录由 Windows Runner 使用 MSYS2 UCRT64 + Qt 构建生成。
|
|
||||||
- 请不要只复制 chengnan.exe,需保留同目录 DLL 和 Qt 插件目录。
|
|
||||||
EOF
|
|
||||||
"@
|
"@
|
||||||
& $bash -lc $script
|
& $bash -lc $script
|
||||||
|
|
||||||
@@ -110,13 +100,14 @@ jobs:
|
|||||||
$shortSha = $env:GITHUB_SHA.Substring(0, 10)
|
$shortSha = $env:GITHUB_SHA.Substring(0, 10)
|
||||||
$version = if ($env:GITHUB_REF_TYPE -eq 'tag') { $env:GITHUB_REF_NAME } else { "build-$shortSha" }
|
$version = if ($env:GITHUB_REF_TYPE -eq 'tag') { $env:GITHUB_REF_NAME } else { "build-$shortSha" }
|
||||||
$zipName = "$env:PACKAGE_BASENAME-$version.zip"
|
$zipName = "$env:PACKAGE_BASENAME-$version.zip"
|
||||||
$dist = Join-Path $env:SOURCE_DIR 'dist-windows\chengnan'
|
$sourceDir = Join-Path $env:RUNNER_TEMP 'chengnan-work'
|
||||||
|
$dist = Join-Path $sourceDir 'dist-windows\chengnan'
|
||||||
if (-not (Test-Path "$dist\chengnan.exe")) { throw "Missing build output: $dist\chengnan.exe" }
|
if (-not (Test-Path "$dist\chengnan.exe")) { throw "Missing build output: $dist\chengnan.exe" }
|
||||||
Push-Location (Split-Path $dist -Parent)
|
Push-Location (Split-Path $dist -Parent)
|
||||||
if (Test-Path (Join-Path $env:SOURCE_DIR $zipName)) { Remove-Item -Force (Join-Path $env:SOURCE_DIR $zipName) }
|
if (Test-Path (Join-Path $sourceDir $zipName)) { Remove-Item -Force (Join-Path $sourceDir $zipName) }
|
||||||
Compress-Archive -Path 'chengnan\*' -DestinationPath (Join-Path $env:SOURCE_DIR $zipName) -Force
|
Compress-Archive -Path 'chengnan\*' -DestinationPath (Join-Path $sourceDir $zipName) -Force
|
||||||
Pop-Location
|
Pop-Location
|
||||||
$zipPath = Join-Path $env:SOURCE_DIR $zipName
|
$zipPath = Join-Path $sourceDir $zipName
|
||||||
$hash = (Get-FileHash $zipPath -Algorithm SHA256).Hash.ToLowerInvariant()
|
$hash = (Get-FileHash $zipPath -Algorithm SHA256).Hash.ToLowerInvariant()
|
||||||
"$hash $zipName" | Out-File -FilePath "$zipPath.sha256" -Encoding ascii
|
"$hash $zipName" | Out-File -FilePath "$zipPath.sha256" -Encoding ascii
|
||||||
"PACKAGE_ZIP=$zipPath" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
"PACKAGE_ZIP=$zipPath" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
|
||||||
|
|||||||
Reference in New Issue
Block a user