Skip to content

Commit 61000ad

Browse files
authored
Update code signing with latest Azure Trusted Signing tools/tasks (#1644)
- Update to the latest version of the GitHub Action (the `azure/azure-code-signing-action` action has been replaced by the `azure/trusted-signing-action` one). - Deploy a forked version of the `Sign.Cli` tool for Trusted Signing, which includes the ability to export the certificate. The fork can be found here https://github.com/mjcheetham/sign/tree/export-opt, and the PR to submit this change upstream here dotnet/sign#734. With these changes we are now completely secret/credential free, and rely on federation only.
2 parents e124b8b + e3facc5 commit 61000ad

File tree

1 file changed

+16
-30
lines changed

1 file changed

+16
-30
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ jobs:
177177
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
178178

179179
- name: Sign payload files with Azure Code Signing
180-
uses: azure/azure-code-[email protected].1
180+
uses: azure/trusted-[email protected].20
181181
with:
182182
endpoint: https://wus2.codesigning.azure.net/
183-
code-signing-account-name: git-fundamentals-signing
183+
trusted-signing-account-name: git-fundamentals-signing
184184
certificate-profile-name: git-fundamentals-windows-signing
185185
files-folder: ${{ github.workspace }}\payload
186186
files-folder-filter: exe,dll
@@ -204,10 +204,10 @@ jobs:
204204
-Destination $env:GITHUB_WORKSPACE\installers
205205
206206
- name: Sign installers with Azure Code Signing
207-
uses: azure/azure-code-[email protected].1
207+
uses: azure/trusted-[email protected].20
208208
with:
209209
endpoint: https://wus2.codesigning.azure.net/
210-
code-signing-account-name: git-fundamentals-signing
210+
trusted-signing-account-name: git-fundamentals-signing
211211
certificate-profile-name: git-fundamentals-windows-signing
212212
files-folder: ${{ github.workspace }}\installers
213213
files-folder-filter: exe
@@ -353,27 +353,20 @@ jobs:
353353
env:
354354
AST: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
355355
ASC: ${{ secrets.AZURE_STORAGE_CONTAINER }}
356-
SCT: ${{ secrets.SIGN_CLI_TOOL }}
356+
SCT: 'Sign.Cli-alpha.zip'
357357
run: |
358358
az storage blob download --file sign-cli.zip --auth-mode login `
359359
--account-name $env:AST --container-name $env:ASC --name $env:SCT
360360
Expand-Archive -Path sign-cli.zip -DestinationPath .\sign-cli
361361
362362
- name: Sign payload
363-
env:
364-
ACST: ${{ secrets.AZURE_TENANT_ID }}
365-
ACSI: ${{ secrets.AZURE_CLIENT_ID }}
366-
ACSS: ${{ secrets.AZURE_CLIENT_SECRET }}
367363
run: |
368-
./sign-cli/sign.exe code azcodesign payload/* `
369-
-acsu https://wus2.codesigning.azure.net/ `
370-
-acsa git-fundamentals-signing `
371-
-acscp git-fundamentals-windows-signing `
364+
./sign-cli/sign.exe code trusted-signing payload/* `
365+
-tse https://wus2.codesigning.azure.net/ `
366+
-tsa git-fundamentals-signing `
367+
-tscp git-fundamentals-windows-signing `
372368
-d "Git Fundamentals Windows Signing Certificate" `
373-
-u "https://github.com/git-ecosystem/git-credential-manager" `
374-
-acst $env:ACST `
375-
-acsi $env:ACSI `
376-
-acss $env:ACSS
369+
-u "https://github.com/git-ecosystem/git-credential-manager"
377370
378371
- name: Lay out signed payload, images, and symbols
379372
shell: bash
@@ -444,28 +437,21 @@ jobs:
444437
env:
445438
AST: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
446439
ASC: ${{ secrets.AZURE_STORAGE_CONTAINER }}
447-
SCT: ${{ secrets.SIGN_CLI_TOOL }}
440+
SCT: 'Sign.Cli-alpha.zip'
448441
run: |
449442
az storage blob download --file sign-cli.zip --auth-mode login `
450443
--account-name $env:AST --container-name $env:ASC --name $env:SCT
451444
Expand-Archive -Path sign-cli.zip -DestinationPath .\sign-cli
452445
453446
- name: Sign package
454-
env:
455-
ACST: ${{ secrets.AZURE_TENANT_ID }}
456-
ACSI: ${{ secrets.AZURE_CLIENT_ID }}
457-
ACSS: ${{ secrets.AZURE_CLIENT_SECRET }}
458447
run: |
459-
./sign-cli/sign.exe code azcodesign nupkg/* `
460-
-acsu https://wus2.codesigning.azure.net/ `
461-
-acsa git-fundamentals-signing `
462-
-acscp git-fundamentals-windows-signing `
448+
./sign-cli/sign.exe code trusted-signing nupkg/* `
449+
-tse https://wus2.codesigning.azure.net/ `
450+
-tsa git-fundamentals-signing `
451+
-tscp git-fundamentals-windows-signing `
463452
-d "Git Fundamentals Windows Signing Certificate" `
464453
-u "https://github.com/git-ecosystem/git-credential-manager" `
465-
-acst $env:ACST `
466-
-acsi $env:ACSI `
467-
-acss $env:ACSS `
468-
-acsc nuget-signing-certificate.cer
454+
-co nuget-signing-certificate.cer
469455
470456
mv nupkg/* .
471457

0 commit comments

Comments
 (0)