ci(release): migrate NuGet publish to Trusted Publishing / OIDC (#207) - #239
Merged
Conversation
Replaces secrets.NUGET_API_KEY with NuGet Trusted Publishing: the publish-nuget job now adds id-token: write, exchanges the GitHub OIDC token for an ephemeral push key via NuGet/login@v1 (SHA-pinned), and publishes with that step-output key. No long-lived API key on GitHub or NuGet. REQUIRES (manual, before the next release runs): a Trusted Publishing policy on nuget.org for BOTH Wolfgang.Etl.TestKit and Wolfgang.Etl.TestKit.Xunit (owner Chris-Wolfgang, repo ETL-Test-Kit, workflow release.yaml). Unblocks the #140 SECURITY.md OIDC release-path appendix. Canonical shape from Etl-DbClient. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 29, 2026
This was referenced Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates
release.yamloffsecrets.NUGET_API_KEYand onto NuGet Trusted Publishing (OIDC) — the fleet-standard now on 9+ repos. Also unblocks #140 (the SECURITY.md OIDC release-path appendix can now be written).The change (publish-nuget job)
permissions: { id-token: write, contents: read }.NuGet/login@8d19675… # v1(id: nuget-login,user: Chris-Wolfgang) — exchanges the GitHub OIDC token for an ephemeral (~1h) push key.--api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }}(the ephemeral step output) instead of the repo secret.secrets.NUGET_API_KEYreference remains anywhere in the file.Canonical shape ported from Etl-DbClient's
release.yamlon main.Configure a Trusted Publishing policy on nuget.org for BOTH packages first, or the OIDC publish fails:
Wolfgang.Etl.TestKitandWolfgang.Etl.TestKit.Xunit→ package page → Manage → Trusted Publishing → Add policy → ownerChris-Wolfgang, repoETL-Test-Kit, workflow.github/workflows/release.yaml.NUGET_API_KEYrepo secret can be deleted.Protected file
release.yamltrips theDetect .NET Projectsguard — handle via the protected-file split / admin-bypass at thevNext → mainstage (it joins the other workflow changes already queued there).Closes #207 when the vNext cycle merges to main.
🤖 Generated with Claude Code