Skip to content

feat(nuget): support Trusted Publishing via NuGet/login - #1097

Merged
samtrion merged 1 commit into
mainfrom
feat/nuget-trusted-publishing
Nov 6, 2026
Merged

samtrion merged 1 commit into
mainfrom
feat/nuget-trusted-publishing

Conversation

@samtrion

@samtrion samtrion commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Adds optional NUGET_USER secret (nuget.org profile name). If set, NuGet/login@v1.2.0 exchanges the GitHub OIDC token for a short-lived API key; otherwise legacy NUGET_TOKEN is used, so existing consumers keep working.

  • id-token: write added to publish-nuget.yml and step-dotnet-publish-nuget.yml
  • NUGET_TOKEN now optional
  • Callers must grant id-token: write and configure a Trusted Publishing policy on nuget.org (workflow = caller's workflow file)

Add optional NUGET_USER secret. When set, authenticate with a short-lived
OIDC-issued API key; otherwise fall back to the legacy NUGET_TOKEN.
Grant id-token: write on the publish workflows.
@samtrion
samtrion merged commit 1f109b8 into main Nov 6, 2026
13 checks passed
@samtrion
samtrion deleted the feat/nuget-trusted-publishing branch November 6, 2026 15:19
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