Repository navigation
Chore/trusted publishing - #39
Merged
Merged
Conversation
nuget.org validates the OIDC `job_workflow_ref` claim against the registered Trusted Publishing policy. Inside a reusable workflow that claim names the called repository, never the caller, so a policy registered for the caller can never match and the exchange fails with "No matching trust policy" (NuGet/NuGetGallery#11000, still open). Move the whole release job into `actions/purview-release`, a composite action that runs in the caller's own job, and reduce `purview-release.yml` to a delegator that forwards to it for older callers. The delegator no longer accepts `trusted-publishing` or `nuget-user`: offering an input that always 401s only invites a broken migration. This repository's own release workflow mints its nuget.org key the same way. Also fix a latent bug: GitHub evaluates the empty string as falsy, so `condition && '' || legacyKey` yields `legacyKey`, and the leftover secret was never blanked. The credential is now chosen in the shell script. BREAKING CHANGE: `purview-release.yml` no longer accepts `trusted-publishing` or `nuget-user`. Trusted Publishing requires calling `purview-dev/build/actions/purview-release` from the consuming repository's own job, which is the workflow file the nuget.org policy names.
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.
No description provided.