-
Notifications
You must be signed in to change notification settings - Fork 663
publish nuget packages using Trusted Publishing #4729
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates NuGet package publishing from using a static API key secret to GitHub OIDC token-based authentication. This improves security by eliminating the need to store long-lived credentials.
- Implements OIDC token exchange flow for NuGet.org authentication
- Removes the
NUGET_API_KEYsecret dependency from the workflow - Converts the publish task to async to support the OIDC token retrieval
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| build/publish/Tasks/PublishNuget.cs | Adds OIDC token exchange logic and converts task to async |
| .github/workflows/_publish.yml | Removes NUGET_API_KEY secret reference |
Comments suppressed due to low confidence (1)
.github/workflows/_publish.yml:11
- Missing required permissions for OIDC token access. The workflow needs
permissions: id-token: writeto allow the publish job to retrieve GitHub OIDC tokens. Add a permissions section to the publish job withid-token: write.
publish:
name: ${{ matrix.taskName }}
runs-on: windows-2025
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7bcb2bc to
21f0a77
Compare
uses OIDC token exchange for nuget api key retrieval, instead of storing the api key in github secrets.
21f0a77 to
211c840
Compare
|
|
Thank you @arturcic for your contribution! |
|
🎉 This issue has been resolved in version 6.5.0 🎉 Your GitReleaseManager bot 📦🚀 |

uses OIDC token exchange for nuget api key retrieval, instead of storing the api key in github secrets.