@@ -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- signing-action@v0.3.1
180+ uses : azure/trusted- signing-action@v0.3.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- signing-action@v0.3.1
207+ uses : azure/trusted- signing-action@v0.3.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
@@ -349,31 +349,16 @@ jobs:
349349 tenant-id : ${{ secrets.AZURE_TENANT_ID }}
350350 subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
351351
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
357353 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
361355
362356 - name : Sign payload
363- env :
364- ACST : ${{ secrets.AZURE_TENANT_ID }}
365- ACSI : ${{ secrets.AZURE_CLIENT_ID }}
366- ACSS : ${{ secrets.AZURE_CLIENT_SECRET }}
367357 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
377362
378363 - name : Lay out signed payload, images, and symbols
379364 shell : bash
@@ -440,37 +425,37 @@ jobs:
440425 tenant-id : ${{ secrets.AZURE_TENANT_ID }}
441426 subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
442427
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
448429 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
452431
453432 - name : Sign package
454- env :
455- ACST : ${{ secrets.AZURE_TENANT_ID }}
456- ACSI : ${{ secrets.AZURE_CLIENT_ID }}
457- ACSS : ${{ secrets.AZURE_CLIENT_SECRET }}
458433 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
470453 uses : actions/upload-artifact@v4
471454 with :
472455 name : dotnet-tool-sign
473- path : nupkg/*.nupkg
456+ path : |
457+ *.nupkg
458+ *.cer
474459
475460# ================================
476461# Validate
0 commit comments