Repository navigation
ci: publish with nuget.org Trusted Publishing - #46
Merged
Merged
Conversation
nuget.org is retiring long-lived API keys in favour of Trusted Publishing, so the release job now mints a short-lived key from its OIDC token instead of reading a stored secret. The release pipeline moved from the reusable workflow to `purview-dev/build/actions/purview-release`, a composite action. That is required: nuget.org validates the OIDC `job_workflow_ref` claim, which inside a called workflow names the called repository rather than this one (NuGet/NuGetGallery#11000). `id-token: write` is granted on the job because GitHub withholds it by default.
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.
nuget.org is retiring long-lived API keys in favour of Trusted Publishing, so the release job now mints a short-lived key from its OIDC token instead of reading a stored secret.
The release pipeline moved from
purview-dev/build/.github/workflows/purview-release.ymltopurview-dev/build/actions/purview-release, a composite action. That is required, not cosmetic: nuget.org validates the OIDCjob_workflow_refclaim against the registered policy, and inside a called workflow that claim names the called repository, never this one (NuGet/NuGetGallery#11000).id-token: writeis granted on the job, because GitHub withholds it by default.PURVIEW_PUBLISH_GITHUB_PACKAGES,PURVIEW_GITHUB_PACKAGES_KEEP_VERSIONS,PURVIEW_GITHUB_PACKAGES_RETENTION_HOURS,PURVIEW_NUGET_SOURCE_MAPPING) are passed as action inputs, since a composite action has novarscontext.PURVIEW_PACKAGES_READ_TOKENis passed explicitly, since a composite action has nosecretscontext.Behaviour is otherwise unchanged: same eligibility gate, same GitHub Packages opt-in, same retention.