File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,31 @@ jobs:
127127 # --------------------------------------------
128128 # Decode signing cert
129129 # --------------------------------------------
130+ - name : Locate signtool.exe
131+ shell : pwsh
132+ run : |
133+ $candidates = @()
134+ $kitsRoot = "${env:ProgramFiles(x86)}\Windows Kits\10\bin"
135+ if (Test-Path $kitsRoot) {
136+ $candidates += Get-ChildItem -Path $kitsRoot -Recurse -Filter signtool.exe -ErrorAction SilentlyContinue
137+ }
138+ $candidates += Get-ChildItem -Path "${env:ProgramFiles(x86)}\Microsoft SDKs" -Recurse -Filter signtool.exe -ErrorAction SilentlyContinue
139+
140+ $signtool = $candidates |
141+ Sort-Object FullName -Descending |
142+ Select-Object -First 1
143+
144+ if (-not $signtool) {
145+ Write-Error "signtool.exe not found on runner."
146+ exit 1
147+ }
148+
149+ Write-Host "Found signtool: $($signtool.FullName)"
150+ Add-Content -Path $env:GITHUB_PATH -Value $signtool.Directory.FullName
151+ signtool /?
152+
130153 - name : Decode code signing certificate
154+ shell : pwsh
131155 run : |
132156 $bytes = [Convert]::FromBase64String("${{ secrets.CODESIGN_PFX }}")
133157 [IO.File]::WriteAllBytes("codesign.pfx", $bytes)
You can’t perform that action at this time.
0 commit comments