Skip to content

Commit f8c2c34

Browse files
committed
release: use 3rd party tool to extract nuget cert
Use a 3rd party tool to extract the NuGet signing certificate for upload rather than relying on an option added to the sign.exe tool in a private fork.
1 parent 61000ad commit f8c2c34

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,21 @@ jobs:
450450
-tsa git-fundamentals-signing `
451451
-tscp git-fundamentals-windows-signing `
452452
-d "Git Fundamentals Windows Signing Certificate" `
453-
-u "https://github.com/git-ecosystem/git-credential-manager" `
454-
-co nuget-signing-certificate.cer
453+
-u "https://github.com/git-ecosystem/git-credential-manager"
455454
456455
mv nupkg/* .
457456
457+
# Remove this once NuGet supports the subscriber identity validation EKU:
458+
# https://github.com/NuGet/NuGetGallery/issues/10027
459+
- name: Extract signing certificate from package
460+
shell: pwsh
461+
run: |
462+
dotnet tool install --global Knapcode.CertificateExtractor
463+
$nupkg = gci *.nupkg
464+
nuget-cert-extractor --file $nupkg --output certs --code-signing --author --leaf
465+
$cert = gci certs\*.cer
466+
mv $cert .\nuget-signing.cer
467+
458468
- name: Publish signed package and certificate
459469
uses: actions/upload-artifact@v4
460470
with:

0 commit comments

Comments
 (0)