Skip to content

Commit cfc5647

Browse files
committed
up
1 parent ef0fa39 commit cfc5647

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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:

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141
],
4242
"windows": {
43-
"signCommand": "powershell.exe -Command \"signtool.exe sign /v /fd SHA256 /tr http://timestamp.acs.microsoft.com /td SHA256 /dlib $env:AZURE_SIGNING_DLIB_PATH /dmdf $env:AZURE_SIGNING_METADATA_PATH '%1'\"",
43+
"signCommand": "%SIGN_COMMAND_PATH% %1",
4444
"nsis": {
4545
"installerIcon": "icons/icon.ico",
4646
"headerImage": "icons/installer-header.bmp",

0 commit comments

Comments
 (0)