Repository navigation
ci: publish to nuget.org with trusted publishing - #5
Merged
Merged
Conversation
Swaps the long-lived NUGET_TOKEN for a short-lived API key from NuGet/login, which exchanges the GitHub OIDC token. The old key had expired, so the 1.0.2 push to nuget.org failed with a 403.
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.org push now uses trusted publishing instead of the long-lived
NUGET_TOKEN. That key had expired, which is why the 1.0.2 push failed with a 403 (it only reached GitHub Packages). NuGet/login exchanges the job's GitHub OIDC token for an API key that lasts an hour. The job now declares its permissions:id-token: writefor the OIDC token, andpackages: writeso the GitHub Packages push keeps working.Before merging:
Topgg.ProxyCheck(top): repository ownertop-gg, repositoryProxyCheck, workflow filedotnet.yml, no environment.NUGET_USERrepo secret holding the nuget.org profile name (not the email) of the user who created the policy.After merging:
NUGET_TOKENsecret.