Skip to content

Fix: pass OIDC API key to nuget push command#92

Merged
jaredpar merged 1 commit into
mainfrom
jaredpar/nuget-trusted-publishing
Jun 18, 2026
Merged

Fix: pass OIDC API key to nuget push command#92
jaredpar merged 1 commit into
mainfrom
jaredpar/nuget-trusted-publishing

Conversation

@jaredpar

Copy link
Copy Markdown
Owner

The trusted publishing workflow merged in #91 exchanges an OIDC token for a NuGet API key via NuGet/login@v1, but the push command wasn't actually using the resulting key. This caused a 401 "An API key must be provided" error.

Fix:

  • Added id: nuget-login to the login step so its outputs are referenceable
  • Changed the push command to pass --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }}

The NuGet/login step outputs the API key but the push command wasn't
using it. Add step id and reference the output via --api-key.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jaredpar jaredpar enabled auto-merge (squash) June 18, 2026 21:04
@jaredpar jaredpar merged commit 628fe98 into main Jun 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant