Skip to content

fix: switch NuGet release publishing to Trusted Publishing (OIDC) - #644

Merged
rexm merged 2 commits into
masterfrom
fix/nuget-trusted-publishing
Aug 5, 2026
Merged

fix: switch NuGet release publishing to Trusted Publishing (OIDC)#644
rexm merged 2 commits into
masterfrom
fix/nuget-trusted-publishing

Conversation

@rexm

@rexm rexm commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

  • The 2.2.0 release run failed publishing to nuget.org with a 403 (NUGET_ORG_PUSH_KEY secret invalid/expired).
  • Replaces the static API key push with NuGet.org Trusted Publishing: the job requests a GitHub OIDC token and exchanges it for a short-lived NuGet API key via NuGet/login.
  • Job is scoped to the release GitHub Actions environment and user: Handlebars-Net, matching the trusted publisher policy already configured on nuget.org.

Test plan

  • Merge this PR
  • Re-run the failed 2.2.0 release workflow run and confirm the package publishes successfully

🤖 Generated with Claude Code

The static NUGET_ORG_PUSH_KEY secret expired/was revoked, causing the
2.2.0 release job to fail with a 403. Replace it with NuGet.org
Trusted Publishing: the job requests a GitHub OIDC token and exchanges
it for a short-lived API key via NuGet/login, scoped to the "release"
environment to match the configured trusted publisher policy.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@rexm
rexm enabled auto-merge August 5, 2026 00:46
@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@rexm
rexm merged commit cfd7143 into master Aug 5, 2026
7 checks passed
@rexm
rexm deleted the fix/nuget-trusted-publishing branch August 5, 2026 01:09
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