Skip to content

Commit 24605e8

Browse files
committed
use codesigning dll
1 parent 1f593d7 commit 24605e8

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ jobs:
2727
go.sum
2828
.goreleaser-windows.yaml
2929
30+
- name: Install Azure Code Signing tools
31+
shell: pwsh
32+
run: |
33+
# Download and install Azure Code Signing tools
34+
Invoke-WebRequest -Uri "https://www.nuget.org/api/v2/package/Microsoft.Trusted.Signing.Client" -OutFile "$env:TEMP\TrustedSigning.zip"
35+
Expand-Archive -Path "$env:TEMP\TrustedSigning.zip" -DestinationPath "$env:TEMP\TrustedSigning" -Force
36+
37+
# Add to PATH so signtool can find the dlib
38+
$dllPath = (Get-ChildItem -Path "$env:TEMP\TrustedSigning" -Recurse -Filter "Azure.CodeSigning.Dlib.dll" | Select-Object -First 1).DirectoryName
39+
echo "$dllPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
40+
3041
- name: Azure Login
3142
shell: pwsh
3243
run: |
@@ -35,15 +46,15 @@ jobs:
3546
-p ${{ secrets.DECO_SIGN_AZURE_CLIENT_SECRET }} `
3647
--tenant ${{ secrets.DECO_SIGN_AZURE_TENANT_ID }}
3748
38-
- name: Setup Azure Trusted Signing
39-
uses: azure/[email protected]
40-
with:
41-
azure-tenant-id: ${{ secrets.DECO_SIGN_AZURE_TENANT_ID }}
42-
azure-client-id: ${{ secrets.DECO_SIGN_AZURE_CLIENT_ID }}
43-
azure-client-secret: ${{ secrets.DECO_SIGN_AZURE_CLIENT_SECRET }}
44-
endpoint: https://eus.codesigning.azure.net/
45-
trusted-signing-account-name: deco-sign
46-
certificate-profile-name: deco-sign
49+
- name: Create Azure Code Signing metadata
50+
shell: pwsh
51+
run: |
52+
$metadata = @{
53+
"Endpoint" = "https://eus.codesigning.azure.net/"
54+
"CodeSigningAccountName" = "deco-sign"
55+
"CertificateProfileName" = "deco-sign"
56+
}
57+
$metadata | ConvertTo-Json | Out-File -FilePath "metadata.json" -Encoding utf8
4758
4859
- name: Run GoReleaser for Windows
4960
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0

.goreleaser-windows.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ signs:
4848
- http://timestamp.digicert.com
4949
- /td
5050
- SHA256
51+
- /dlib
52+
- Azure.CodeSigning.Dlib.dll
53+
- /dmdf
54+
- metadata.json
5155
- ${artifact}
5256
artifacts: binary
5357

0 commit comments

Comments
 (0)