Repository navigation
Publish to NuGet through Trusted Publishing - #95
Merged
Merged
Conversation
The NUGET_TOKEN API key expired, so the v2.4.36 release packed and tagged but failed to push. The release job now requests a GitHub OIDC token and exchanges it through NuGet/login for a one-hour API key, under the nuget.org Trusted Publishing policy for release.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
The
NUGET_TOKENAPI key expired. The v2.4.36 release run packed the package and pushed thev2.4.36tag, thendotnet nuget pushgot403 (The specified API key has expired...). No GitHub release was created and 2.4.36 never reached nuget.org. This PR moves the release job to nuget.org Trusted Publishing, so it no longer depends on a long-lived key.Changes
.github/workflows/release.yml: the release job getsid-token: writeso it can request a GitHub OIDC token. A newNuGet/login@v1step, as userAngeloTadeucci, exchanges that token for a one-hour API key.Pushuses the step'sNUGET_API_KEYoutput instead of theNUGET_TOKENsecret.nuget.org policy
The Trusted Publishing policy is saved and active on nuget.org:
AngeloTadeuccims2community, repositorymaple2.filerelease.yml, no environmentThe
checkjob skips the release when the version's tag already exists. The unpublishedv2.4.36tag has no package and no release, so it will be deleted before merge, and the merge then releases 2.4.36 frommaster.Verification
Nothing has run yet. The release run on the merge commit is the first real test of the login and push steps.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.