Skip to content

Use NuGet trusted publishing#6592

Merged
roji merged 1 commit into
npgsql:mainfrom
roji:roji/nuget-oidc-publishing
May 27, 2026
Merged

Use NuGet trusted publishing#6592
roji merged 1 commit into
npgsql:mainfrom
roji:roji/nuget-oidc-publishing

Conversation

@roji

@roji roji commented May 27, 2026

Copy link
Copy Markdown
Member

Summary

  • switch the nuget.org release job from the long-lived NUGET_ORG_API_KEY secret to NuGet Trusted Publishing via NuGet/login@v1
  • grant the release job id-token: write so GitHub Actions can mint the OIDC token
  • publish with the short-lived API key returned by NuGet.org

Required NuGet.org setup

Before the next tag release, add a NuGet.org Trusted Publishing policy for the Npgsql owner matching:

Field Value
Repository owner npgsql
Repository npgsql
Workflow file build.yml
Environment nuget.org

The workflow uses user: Npgsql for the NuGet login action.

Switch the nuget.org release job from a long-lived API key secret to NuGet Trusted Publishing via OIDC.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings May 27, 2026 09:43
@roji
roji requested a review from vonzshik as a code owner May 27, 2026 09:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.

@roji
roji merged commit 5ba8a39 into npgsql:main May 27, 2026
12 checks passed
@roji
roji deleted the roji/nuget-oidc-publishing branch May 27, 2026 09:53
roji added a commit that referenced this pull request May 27, 2026
Switch the nuget.org release job from a long-lived API key secret to NuGet Trusted Publishing via OIDC.

(cherry picked from commit 5ba8a39)
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.

2 participants