Repository navigation
ci: publish to NuGet with trusted publishing - #32
Merged
Merged
Conversation
nuget.org API keys expire and the org key already did, which made the last releases fail with 403. Publish with NuGet/login (OIDC) instead: the job gets a short-lived key from the trusted publishing policy for this repository and workflow file. Also adds a workflow_dispatch input to publish an existing release tag again, since re-running the job skips the push once the release exists.
|
🎉 This PR is included in version 8.0.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Why
The org NuGet API key (
NUGET_AUTH_TOKEN) expired, so the last releases were tagged on GitHub but failed to push with403 The specified API key has expired.What changes
NuGet/login@v1exchanges the GitHub OIDC token for a short-lived nuget.org key. There's no long-lived secret to expire anymore.desenvolvedor.ioand bound to this repository and workflow file.NUGET_USERis an org-level Actions variable.permissionsgainsid-token: write.workflow_dispatchinputversionchecks out tagv<version>, builds, tests, packs and pushes it, skipping semantic-release.envand validated as semver, so the input isn't interpolated into the script.--skip-duplicate.After merging
The merge commit is
ci:, so it releases nothing by itself. Once it's merged,NUGET_AUTH_TOKENcan be removed from the org.