- 
 
- 
  Notifications
 You must be signed in to change notification settings 
- Fork 193
feat(actions): add nuget trusted publishing #631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
 
  Open
 
 
 micheloliveira-com
 wants to merge
 2
 commits into
 passwordless-lib:main 
 
 
  
from
micheloliveira-com:feature/nuget-trusted-publishing 
 
 
 
  
 
 
 
 
 
 
 
 
 
 
  Open
 
 feat(actions): add nuget trusted publishing #631
 micheloliveira-com
 wants to merge
 2
 commits into
 passwordless-lib:main 
from
micheloliveira-com:feature/nuget-trusted-publishing 
 
 
 
  
 
 Conversation
 
 
 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
 
 
 
 
 Note: I think leaving NuGet/login without a SHA hash is fine since it's an official Microsoft action.
- Forcing a SHA might break in future core NuGet changes.
 
 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.
 
 
 
 
Uh oh!
There was an error while loading. Please reload this page.
Motivation
As described in the official announcement, the new Trusted Publishing feature greatly enhances package publishing security on NuGet.org.
We successfully tested this approach with our own NuGet library:
Required changes in this repository
secrets.NUGET_USERto this repository, using the NuGet.org username (profile name) of the package owner (abergs in this case).secrets.NUGET_API_KEYsecret can be removed from this repository and also from the NuGet.org account if it was only used here.One-time configuration on NuGet.org
According to the documentation:
abergs).passwordless-lib).fido2-net-lib)..github/workflows/(e.g.main.yml).This setup eliminates the need for long-lived API keys and improves the overall security of the publishing process.