@@ -177,10 +177,10 @@ jobs:
177
177
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
178
178
179
179
- name : Sign payload files with Azure Code Signing
180
- uses :
azure/azure-code- [email protected] .1
180
+ uses :
azure/trusted- [email protected] .20
181
181
with :
182
182
endpoint : https://wus2.codesigning.azure.net/
183
- code -signing-account-name : git-fundamentals-signing
183
+ trusted -signing-account-name : git-fundamentals-signing
184
184
certificate-profile-name : git-fundamentals-windows-signing
185
185
files-folder : ${{ github.workspace }}\payload
186
186
files-folder-filter : exe,dll
@@ -204,10 +204,10 @@ jobs:
204
204
-Destination $env:GITHUB_WORKSPACE\installers
205
205
206
206
- name : Sign installers with Azure Code Signing
207
- uses :
azure/azure-code- [email protected] .1
207
+ uses :
azure/trusted- [email protected] .20
208
208
with :
209
209
endpoint : https://wus2.codesigning.azure.net/
210
- code -signing-account-name : git-fundamentals-signing
210
+ trusted -signing-account-name : git-fundamentals-signing
211
211
certificate-profile-name : git-fundamentals-windows-signing
212
212
files-folder : ${{ github.workspace }}\installers
213
213
files-folder-filter : exe
@@ -349,31 +349,16 @@ jobs:
349
349
tenant-id : ${{ secrets.AZURE_TENANT_ID }}
350
350
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
351
351
352
- - name : Download/extract Sign CLI tool
353
- env :
354
- AST : ${{ secrets.AZURE_STORAGE_ACCOUNT }}
355
- ASC : ${{ secrets.AZURE_STORAGE_CONTAINER }}
356
- SCT : ${{ secrets.SIGN_CLI_TOOL }}
352
+ - name : Install sign CLI tool
357
353
run : |
358
- az storage blob download --file sign-cli.zip --auth-mode login `
359
- --account-name $env:AST --container-name $env:ASC --name $env:SCT
360
- Expand-Archive -Path sign-cli.zip -DestinationPath .\sign-cli
354
+ dotnet tool install -g --version 0.9.1-beta.24325.5
361
355
362
356
- name : Sign payload
363
- env :
364
- ACST : ${{ secrets.AZURE_TENANT_ID }}
365
- ACSI : ${{ secrets.AZURE_CLIENT_ID }}
366
- ACSS : ${{ secrets.AZURE_CLIENT_SECRET }}
367
357
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 `
372
- -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
358
+ sign.exe code trusted-signing payload/* `
359
+ -tse https://wus2.codesigning.azure.net/ `
360
+ -tsa git-fundamentals-signing `
361
+ -tscp git-fundamentals-windows-signing
377
362
378
363
- name : Lay out signed payload, images, and symbols
379
364
shell : bash
@@ -440,37 +425,37 @@ jobs:
440
425
tenant-id : ${{ secrets.AZURE_TENANT_ID }}
441
426
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
442
427
443
- - name : Download/extract Sign CLI tool
444
- env :
445
- AST : ${{ secrets.AZURE_STORAGE_ACCOUNT }}
446
- ASC : ${{ secrets.AZURE_STORAGE_CONTAINER }}
447
- SCT : ${{ secrets.SIGN_CLI_TOOL }}
428
+ - name : Install sign CLI tool
448
429
run : |
449
- az storage blob download --file sign-cli.zip --auth-mode login `
450
- --account-name $env:AST --container-name $env:ASC --name $env:SCT
451
- Expand-Archive -Path sign-cli.zip -DestinationPath .\sign-cli
430
+ dotnet tool install -g --version 0.9.1-beta.24325.5
452
431
453
432
- name : Sign package
454
- env :
455
- ACST : ${{ secrets.AZURE_TENANT_ID }}
456
- ACSI : ${{ secrets.AZURE_CLIENT_ID }}
457
- ACSS : ${{ secrets.AZURE_CLIENT_SECRET }}
458
433
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 `
463
- -d "Git Fundamentals Windows Signing Certificate" `
464
- -u "https://github.com/git-ecosystem/git-credential-manager" `
465
- -acst $env:ACST `
466
- -acsi $env:ACSI `
467
- -acss $env:ACSS
468
-
469
- - name : Publish signed package
434
+ sign.exe code trusted-signing nupkg/* `
435
+ -tse https://wus2.codesigning.azure.net/ `
436
+ -tsa git-fundamentals-signing `
437
+ -tscp git-fundamentals-windows-signing
438
+
439
+ mv nupkg/* .
440
+
441
+ # Remove this once NuGet supports the subscriber identity validation EKU:
442
+ # https://github.com/NuGet/NuGetGallery/issues/10027
443
+ - name : Extract signing certificate from package
444
+ shell : pwsh
445
+ run : |
446
+ dotnet tool install --global Knapcode.CertificateExtractor
447
+ $nupkg = gci *.nupkg
448
+ nuget-cert-extractor --file $nupkg --output certs --code-signing --author --leaf
449
+ $cert = gci certs\*.cer
450
+ mv $cert .\nuget-signing.cer
451
+
452
+ - name : Publish signed package and certificate
470
453
uses : actions/upload-artifact@v4
471
454
with :
472
455
name : dotnet-tool-sign
473
- path : nupkg/*.nupkg
456
+ path : |
457
+ *.nupkg
458
+ *.cer
474
459
475
460
# ================================
476
461
# Validate
0 commit comments