Repository navigation
ci(dotnet): publish to NuGet with trusted publishing - #1974
Merged
Merged
Conversation
Mirrors appwrite/sdk-for-dotnet: NuGet/login exchanges the job's GitHub OIDC token for a short-lived API key instead of the NUGET_TOKEN secret, so regenerating the SDK keeps trusted publishing.
🟢 Tier S · Ready to merge
Updates the generated .NET release workflow to use NuGet trusted publishing instead of the long-lived NUGET_TOKEN secret. The publish job requests OIDC permissions, authenticates through a pinned NuGet/login action using the NUGET_USER repository variable, and pushes packages with the resulting short-lived API key. Latest changes: The newest commit reads the NuGet username from vars.NUGET_USER instead of secrets.NUGET_USER.
📂 Walkthrough · 1
Reviewed the commits since |
It only names the nuget.org account the short-lived key is issued for and grants nothing on its own.
1 of 3 tasks
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 .NET SDK template's publish workflow now uses NuGet trusted publishing instead of the
NUGET_TOKENsecret, matching appwrite/sdk-for-dotnet#105. Without this, the next generated release would put the expired-key workflow back.The rendered template is byte-identical to the workflow in that PR.
NuGet/loginis pinned to v1.2.0 (8d196754), like the other actions in the template.The NuGet username is read from the
NUGET_USERrepository variable rather than a secret: it only names the nuget.org account the short-lived key is issued for.Closes #1975