@@ -159,8 +159,17 @@ jobs:
159159 AZURE_TRUSTED_SIGNING_ACCOUNT_NAME : ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
160160 AZURE_CERTIFICATE_PROFILE_NAME : ${{ secrets.AZURE_CERTIFICATE_PROFILE_NAME }}
161161 run : |
162+ # Download and extract Windows SDK Build Tools (contains SignTool)
163+ $buildToolsVersion = "10.0.26100.4188"
164+ Invoke-WebRequest -Uri "https://www.nuget.org/api/v2/package/Microsoft.Windows.SDK.BuildTools/$buildToolsVersion" -OutFile "buildtools.zip"
165+ Expand-Archive -Path "buildtools.zip" -DestinationPath "buildtools"
166+
167+ $signtoolPath = Join-Path $PWD "buildtools\bin\$buildToolsVersion\x64\signtool.exe"
168+ echo "SIGNTOOL_PATH=$signtoolPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
169+
162170 # Download and extract Azure Trusted Signing dlib
163- Invoke-WebRequest -Uri "https://www.nuget.org/api/v2/package/Microsoft.Trusted.Signing.Client/1.0.95" -OutFile "trustedsigning.zip"
171+ $trustedSigningVersion = "1.0.95"
172+ Invoke-WebRequest -Uri "https://www.nuget.org/api/v2/package/Microsoft.Trusted.Signing.Client/$trustedSigningVersion" -OutFile "trustedsigning.zip"
164173 Expand-Archive -Path "trustedsigning.zip" -DestinationPath "trustedsigning"
165174
166175 $dlibPath = Join-Path $PWD "trustedsigning\bin\x64\Azure.CodeSigning.Dlib.dll"
@@ -176,9 +185,19 @@ jobs:
176185 $metadata | ConvertTo-Json | Set-Content -Path $metadataPath
177186 echo "AZURE_SIGNING_METADATA_PATH=$metadataPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
178187
188+ echo "SignTool: $signtoolPath"
179189 echo "Trusted Signing dlib: $dlibPath"
180190 echo "Metadata file: $metadataPath"
181191
192+ # Create sign.bat wrapper script for NSIS
193+ $signBatPath = Join-Path $PWD "sign.bat"
194+ @"
195+ @echo off
196+ " $signtoolPath" sign /v /fd SHA256 /tr http://timestamp.acs.microsoft.com /td SHA256 /dlib "$dlibPath" /dmdf "$metadataPath" %1
197+ " @ | Set-Content -Path $signBatPath -Encoding ASCII
198+ echo " SIGN_COMMAND_PATH=$signBatPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
199+ echo "Created sign.bat at : $signBatPath"
200+
182201 - name : Build GUI
183202 uses : tauri-apps/tauri-action@v0
184203 env :
0 commit comments