ci: sign nupkgs against Azure Key Vault using NuGetKeyVaultSignTool#10
Merged
Conversation
Code signing requirements now mandate HSM-compatible certificate storage: local PFX files are no longer viable. The certificate has moved to an Azure Key Vault, so the workflow needs a tool that can sign nupkgs using a remote key -- 'dotnet nuget sign' only supports local PFX paths. Replace the PFX-based 'dotnet nuget sign' step with NuGetKeyVaultSignTool 3.2.3, pinned via a new .config/dotnet-tools.json manifest. The workflow restores the tool, acquires an access token for https://vault.azure.net through a client_credentials grant against Entra ID, and signs every produced nupkg using the remote certificate. Required GitHub configuration: - secrets.AZURE_CODE_SIGNING_VAULT_URL - vars.AZURE_CODE_SIGNING_CERT_NAME - vars.AZURE_CODE_SIGNING_TIMESTAMP_SERVER - secrets.AZURE_CODE_SIGNING_TENANT - secrets.AZURE_CODE_SIGNING_APP_ID - secrets.AZURE_CODE_SIGNING_APP_PASSWORD Once validated, the legacy secrets can be removed: - secrets.CODE_SIGN_CERTIFICATE_BASE64 - secrets.CODE_SIGN_CERTIFICATE_PASSWORD - secrets.CODE_SIGN_CERTIFICATE_TIMESTAMPER_URL
GitHub deprecated Node.js 20 action runtimes and will force them onto Node.js 24 starting June 2, 2026. The pinned versions of actions/checkout and actions/setup-dotnet still ship Node 20 binaries and trigger the deprecation warning on every run. Bump to the latest releases whose action.yml declares 'using: node24': - actions/checkout v2 -> v6 - actions/setup-dotnet v2 -> v5
Adds 'feature/azure-keyvault-signing' to the push triggers so the full build/sign/publish pipeline runs against this branch and we can confirm the Azure Key Vault signing step works end-to-end before merging. Must be reverted before this PR is merged.
The previous TEMP commit added 'feature/azure-keyvault-signing' to the push triggers so the signing step could be exercised, but that also caused 'Configure Azure Artifacts feed' and 'Publish' to push a real prerelease nupkg to Azure Artifacts. We only want to validate signing, not pollute the feed. Add a ref_name guard to both publish-related steps so the workflow stops after the Sign step on this branch. Must be reverted (together with the push-trigger entry) before merge.
Reverts the two TEMP commits added to exercise the new signing step on this branch: - 'ci: TEMP run build on feature branch to validate signing' (eb7c2b0) - 'ci: TEMP skip publish on test branch, sign-only run' (9183690) The signing step has been confirmed working end-to-end, so the push trigger entry and the ref_name guards on Configure/Publish are no longer needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code signing requirements now mandate HSM-compatible certificate storage: local PFX files are no longer viable. The certificate has moved to an Azure Key Vault, so the workflow needs a tool that can sign nupkgs using a remote key -- 'dotnet nuget sign' only supports local PFX paths.
Replace the PFX-based 'dotnet nuget sign' step with NuGetKeyVaultSignTool 3.2.3, pinned via a new .config/dotnet-tools.json manifest. The workflow restores the tool, acquires an access token for https://vault.azure.net through a client_credentials grant against Entra ID, and signs every produced nupkg using the remote certificate.
Required GitHub configuration:
Once validated, the legacy secrets can be removed: