ci(windows): sign releases with Azure Artifact Signing and OIDC

This commit is contained in:
Kevin Yue committed 2026-11-19 00:01:02 +08:00
1 parent 693a619659
commit 1da96d9459
7 files changed
+89 -3

No files matched your search

+7
View File
@@ -20,6 +20,13 @@ if ($process.ExitCode -ne 0) {
}
$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.' }
if ($env:WINDOWS_SIGNING_PUBLISHER) {
$signed = @($Installer)
foreach ($name in @('gpgui.exe', 'gpauth.exe', 'gpservice.exe', 'gp-posture.exe', 'libopenconnect-5.dll', 'uninstall.exe')) {
$signed += Join-Path $destination $name
}
& (Join-Path $PSScriptRoot 'test-windows-signature.ps1') -Files $signed -Publisher $env:WINDOWS_SIGNING_PUBLISHER
}
$service = Get-CimInstance Win32_Service -Filter "Name='GPConnect'"
if ($service.State -ne 'Running' -or $service.StartMode -ne 'Auto' -or $service.StartName -ne 'LocalSystem') {
throw 'The service did not start automatically as LocalSystem.'