ci: retain signed candidates and installer failure diagnostics

This commit is contained in:
Kevin Yue committed 2026-11-15 01:02:57 +08:00
1 parent 0f85b259cd
commit 78afa8fd14
2 files changed
+9 -1

No files matched your search

+3
View File
@@ -145,6 +145,7 @@ jobs:
}
Write-Host 'Windows compilation and packaging passed.'
- name: Sign and verify update payload
id: sign
shell: pwsh
env:
UPDATE_PRIVATE_KEY: ${{ secrets.WINDOWS_UPDATE_PRIVATE_KEY }}
@@ -173,6 +174,7 @@ jobs:
if ($installer.Count -ne 1) { throw 'Expected exactly one Windows installer.' }
& ./source/gp/scripts/test-windows-installer.ps1 -Installer $installer[0].FullName -Architecture $env:BUILD_ARCHITECTURE -Build $env:GPGUI_BUILD_VERSION
- uses: actions/upload-artifact@v7
if: ${{ !cancelled() && steps.sign.outcome == 'success' }}
with:
name: artifact-gpgui-windows-${{ inputs.architecture }}
path: |
@@ -180,5 +182,6 @@ jobs:
artifacts/*.sig
artifacts/*.sha256
artifacts/*.zip
overwrite: true
if-no-files-found: error
retention-days: 7
+6 -1
View File
@@ -12,7 +12,12 @@ if ((Test-Path $destination) -or (Get-Service GPConnect -ErrorAction SilentlyCon
throw 'Run this installer test on a clean Windows test machine.'
}
$process = Start-Process $Installer -ArgumentList '/S' -PassThru -Wait
if ($process.ExitCode -ne 0) { throw 'The installer failed.' }
if ($process.ExitCode -ne 0) {
# This test requires an empty CI installation; this log contains only installer operations.
$log = Join-Path $env:ProgramData 'GP Connect\installer.log'
if (Test-Path $log) { Get-Content $log -Tail 80 | Write-Host }
throw "The installer failed with exit code $($process.ExitCode)."
}
$info = Get-Content (Join-Path $destination 'build-info.json') -Raw | ConvertFrom-Json
if ($info.architecture -ne $Architecture -or [string]$info.build_version -ne $Build) { throw 'The installed package identity does not match.' }
$service = Get-CimInstance Win32_Service -Filter "Name='GPConnect'"