ci(windows): authenticate after compilation before signing

This commit is contained in:
Kevin Yue committed 2026-11-19 00:09:06 +08:00
1 parent d9df8eb34b
commit 756b8b8957
1 file changed
+23 -13
+23 -13
View File
@@ -133,16 +133,7 @@ jobs:
& ./source/gp/scripts/build-openconnect-windows.ps1 -MsysRoot $env:MSYS_ROOT -MsysSubsystem ${{ steps.native.outputs.subsystem }} -Prefix $prefix
& ./source/gp/scripts/test-openconnect-windows.ps1 -MsysRoot $env:MSYS_ROOT -MsysSubsystem ${{ steps.native.outputs.subsystem }} -Prefix $prefix
"OPENCONNECT_WINDOWS_PREFIX=$prefix" >> $env:GITHUB_ENV
- name: Log in to Azure with GitHub OIDC
uses: azure/login@v3
with:
client-id: ${{ vars.AZURE_SIGNING_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- name: Install Microsoft Artifact Signing tooling
shell: pwsh
run: Install-Module ArtifactSigning -RequiredVersion 0.1.20 -Repository PSGallery -Force -Scope CurrentUser
- name: Build and package the matching Windows runtime
- name: Build the matching Windows runtime
shell: pwsh
env:
MSYS_ROOT: ${{ steps.msys2.outputs.msys2-location }}
@@ -151,16 +142,35 @@ jobs:
$log = Join-Path $env:RUNNER_TEMP 'windows-package.log'
# Compiler diagnostics may contain private GUI source. Keep them on the runner.
try {
& ./source/gpgui/scripts/build-windows.ps1 -Profile Release -Sign `
& ./source/gpgui/scripts/build-windows.ps1 -Profile Release -BuildOnly `
-NativePrefix $env:OPENCONNECT_WINDOWS_PREFIX -MsysRoot $env:MSYS_ROOT -MsysSubsystem ${{ steps.native.outputs.subsystem }} `
-WintunDirectory (Join-Path $env:WINDOWS_BUILD_TOOLS 'wintun') `
-MakeNsis (Join-Path ${env:ProgramFiles(x86)} 'NSIS/makensis.exe') `
-OutputDirectory "$env:GITHUB_WORKSPACE/artifacts" *> $log
} catch {
python ./.ci/scripts/private-ci-diagnostics.py compile $log
throw 'Windows compilation or packaging failed; private diagnostics remain on the runner.'
throw 'Windows compilation failed; private diagnostics remain on the runner.'
}
Write-Host 'Windows compilation and packaging passed.'
Write-Host 'Windows compilation passed.'
- name: Install Microsoft Artifact Signing tooling
shell: pwsh
run: Install-Module ArtifactSigning -RequiredVersion 0.1.20 -Repository PSGallery -Force -Scope CurrentUser
- name: Log in to Azure with GitHub OIDC
uses: azure/login@v3
with:
client-id: ${{ vars.AZURE_SIGNING_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
- name: Sign and package the Windows runtime
shell: pwsh
env:
MSYS_ROOT: ${{ steps.msys2.outputs.msys2-location }}
run: |
& ./source/gpgui/scripts/build-windows.ps1 -Profile Release -SkipBuild -Sign `
-NativePrefix $env:OPENCONNECT_WINDOWS_PREFIX -MsysRoot $env:MSYS_ROOT -MsysSubsystem ${{ steps.native.outputs.subsystem }} `
-WintunDirectory (Join-Path $env:WINDOWS_BUILD_TOOLS 'wintun') `
-MakeNsis (Join-Path ${env:ProgramFiles(x86)} 'NSIS/makensis.exe') `
-OutputDirectory "$env:GITHUB_WORKSPACE/artifacts"
- name: Sign and verify update payload
id: sign
shell: pwsh