Skip to content

Commit 2719153

Browse files
committed
fixup! fixup! release: create initial Windows installer build workflow
Replace Bash script (using `signtool`) for validating executables are code-signed correctly with a PowerShell script (which instead uses the `Get-AuthenticodeSignature` cmdlet). The `signtool` is only available in the Windows SDK, which isn't always installed on self-hosted runners (e.g., for ARM64), but PowerShell is always available on our images. Signed-off-by: Matthew John Cheetham <[email protected]>
1 parent cbb2a2e commit 2719153

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/build-git-installers.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,21 @@ jobs:
357357
openssl dgst -sha256 artifacts/${{matrix.type.fileprefix}}-*.exe | sed "s/.* //" >artifacts/sha-256.txt
358358
- name: Verify that .exe files are code-signed
359359
if: env.DO_WIN_CODESIGN == 'true'
360-
shell: bash
360+
shell: pwsh
361361
run: |
362-
PATH=$PATH:"/c/Program Files (x86)/Windows Kits/10/App Certification Kit/" \
363-
signtool verify //pa artifacts/${{matrix.type.fileprefix}}-*.exe
362+
$ret = 0
363+
$files = Get-ChildItem -Path artifacts -Filter "${{matrix.type.fileprefix}}-*.exe"
364+
foreach ($file in $files) {
365+
$signature = Get-AuthenticodeSignature -FilePath $file.FullName
366+
if ($signature.Status -eq 'Valid') {
367+
Write-Host "[ VALID ] $($file.FullName)"
368+
} else {
369+
Write-Host "[INVALID] $($file.FullName)"
370+
Write-Host " Message: $($signature.StatusMessage)"
371+
$ret = 1
372+
}
373+
}
374+
exit $ret
364375
- name: Publish ${{matrix.type.name}}-${{matrix.arch.name}}
365376
uses: actions/upload-artifact@v4
366377
with:

0 commit comments

Comments
 (0)