Repository navigation
NuGet publish: trusted publishing and manual re-publish of a release tag - #149
Merged
Merged
Conversation
…of a stored API key, and a manual run that publishes an existing release tag
…r RMC package workflows do
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.
Summary
The v2.3.0 NuGet publish failed with a 403: the stored
NUGET_ORG_API_KEYhas expired. This switchesNuGetPublish.ymlto nuget.org trusted publishing and makes it possible to publish an existing release tag again.id-token: write) and exchanges it throughNuGet/login@v1for a one-hour nuget.org API key; no long-lived key is stored.workflow_dispatchinputrelease_tag: a manual run checks out that tag and publishes it, so v2.3.0 can be published from main without moving the tag.PythonPublish.ymlmatches for its automatic chain.One-time setup
USACE-RMC, Repository OwnerUSACE-RMC, RepositoryNumerics, Workflow FileNuGetPublish.yml, packageRMC.Numerics, no environment.USACE-RMC, as in the other RMC package workflows; no secret is needed.Publishing v2.3.0 after merge
gh workflow run NuGetPublish.yml -R USACE-RMC/Numerics --ref main -f release_tag=v2.3.0gh workflow run PythonPublish.yml -R USACE-RMC/Numerics --ref main -f release_tag=v2.3.0 -f publish_to_pypi=true, then approve thepypienvironment. The automatic PyPI chain only follows NuGet runs started by a Release event.The
NUGET_ORG_API_KEYsecret can be deleted once this is in use.🤖 Generated with Claude Code