Skip to content

ci: publish to NuGet with Trusted Publishing instead of an API key - #9

Merged
jacalapa merged 1 commit into
mainfrom
ci/trusted-publishing
Nov 11, 2026
Merged

jacalapa merged 1 commit into
mainfrom
ci/trusted-publishing

Conversation

@jacalapa

Copy link
Copy Markdown
Contributor

Why

Publishing 2.0.1 failed at "Push to NuGet":

403 (The specified API key has expired. Please create a new API key at https://www.nuget.org/account/apikeys.)

nuget.org recommends Trusted Publishing over API keys for GitHub Actions.

Change

  • The publish job gets id-token: write (and contents: read).
  • NuGet/login@v1 exchanges the workflow's OIDC token for a short-lived API key, used by dotnet nuget push. The NUGET_API_KEY secret is no longer used and can be deleted.

Needs

  • nuget.org Trusted Publishing policy — created: owner kododo-dev, repository kododo-dev/RunWay, workflow publish-nuget.yml, packages Kododo.RunWay*.
  • Variable NUGET_USER (nuget.org user name), on the organization or the repository.

Only runs on a v* tag, so CI on this PR does not exercise it.

🤖 Generated with Claude Code

The NuGet API key in NUGET_API_KEY expired and the 2.0.1 publish failed with 403.
NuGet/login exchanges the workflow's OIDC token for a short-lived API key, so the
repository keeps no long-lived key. Needs the nuget.org policy (owner kododo-dev,
repository kododo-dev/RunWay, workflow publish-nuget.yml, packages Kododo.RunWay*)
and the NUGET_USER variable (nuget.org user name).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jacalapa
jacalapa merged commit bd896d9 into main Nov 11, 2026
3 checks passed
@jacalapa
jacalapa deleted the ci/trusted-publishing branch November 11, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant