Skip to content

Publish to NuGet.org through trusted publishing - #217

Merged
pvginkel merged 1 commit into
mainfrom
nuget-trusted-publishing
Nov 21, 2026
Merged

pvginkel merged 1 commit into
mainfrom
nuget-trusted-publishing

Conversation

@pvginkel

Copy link
Copy Markdown
Member

nuget.org now caps API keys at 30 days and steers GitHub Actions to trusted publishing. The v0.11 release run failed on its first push with an expired NUGET_API_KEY; nothing was published.

The release workflow now trades its OIDC token for a one-hour nuget.org key through NuGet/login@v1, right before the two pushes:

  • id-token: write added to the workflow's permissions.
  • The user input reads the nuget.org profile name from the NUGET_USER secret, as the docs recommend.
  • The trusted publishing policy on nuget.org (owner pvginkel, repository TQLApp/TQL, workflow release.yml, no environment) is in place, and NUGET_API_KEY has been deleted.

After merge, v0.11 moves to the merge commit: a tag push runs the workflow as it is at the tagged commit.

Not yet proven: whether the temporary key can push a never-published package ID (TQLApp.Plugins.YouTrack) and the symbol packages. The v0.11 run is the test; --skip-duplicate lets a re-run pick up where it stopped.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RGjkV4gS8yYKqvzQa4b3Tg

nuget.org now caps API keys at 30 days and steers GitHub Actions to
trusted publishing. The release workflow trades its OIDC token for a
one-hour key through NuGet/login, which needs id-token: write and the
nuget.org username in the NUGET_USER secret, and the trusted publishing
policy on nuget.org for TQLApp/TQL and release.yml. NUGET_API_KEY is no
longer used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RGjkV4gS8yYKqvzQa4b3Tg
@pvginkel
pvginkel enabled auto-merge (squash) November 21, 2026 19:27
@pvginkel
pvginkel merged commit 5b79772 into main Nov 21, 2026
1 check passed
@pvginkel
pvginkel deleted the nuget-trusted-publishing branch November 21, 2026 19:29
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