File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,27 @@ jobs:
119119 }
120120 $metadata | ConvertTo-Json | Out-File -FilePath "metadata.json" -Encoding utf8
121121
122+ - name : Create signing script
123+ shell : pwsh
124+ run : |
125+ $script = @'
126+ $env:AZURE_TENANT_ID = "${{ secrets.DECO_SIGN_AZURE_TENANT_ID }}"
127+ $env:AZURE_CLIENT_ID = "${{ secrets.DECO_SIGN_AZURE_CLIENT_ID }}"
128+ $env:AZURE_CLIENT_SECRET = "${{ secrets.DECO_SIGN_AZURE_CLIENT_SECRET }}"
129+
130+ $filePath = $args[0]
131+ Write-Host "Signing: $filePath"
132+
133+ & signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /dlib Azure.CodeSigning.Dlib.dll /dmdf metadata.json "$filePath"
134+
135+ if ($LASTEXITCODE -ne 0) {
136+ Write-Error "Signing failed with exit code $LASTEXITCODE"
137+ exit $LASTEXITCODE
138+ }
139+ '@
140+
141+ $script | Out-File -FilePath "sign.ps1" -Encoding utf8
142+
122143 - name : Run GoReleaser for Windows
123144 uses : goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
124145 with :
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ builds:
4141
4242 hooks :
4343 post :
44- - pwsh -Command "signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /dlib Azure.CodeSigning.Dlib.dll /dmdf metadata.json ' {{ .Path }}' "
44+ - pwsh -File sign.ps1 " {{ .Path }}"
4545
4646archives :
4747 - formats : ["zip"]
You can’t perform that action at this time.
0 commit comments