Skip to content

ci: publish to nuget.org with trusted publishing - #236

Merged
ognjenkatic merged 2 commits into
masterfrom
ci/nuget-trusted-publishing
Nov 10, 2026
Merged

ognjenkatic merged 2 commits into
masterfrom
ci/nuget-trusted-publishing

Conversation

@ognjenkatic

@ognjenkatic ognjenkatic commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Replace the long-lived NUGET_API_KEY secret with trusted publishing. NuGet/login@v1 exchanges the job's OIDC token for a short-lived API key after packing, right before the pushes. The current key has expired, so publishing fails with 403.

Before the first run:

  • On nuget.org, create a GitHub Actions trusted publishing policy: owner codaxy, repository conductor-sharp, workflow file release.yml, no environment, package owner codaxy. One policy covers every branch, so v3 releases use it too.
  • Set the repository variable NUGET_USER (done) to the nuget.org profile username of the person who created the policy. It must not be an email address or the organization name.
  • After a successful publish, delete the NUGET_API_KEY secret.

Same change for the 3.x line: #235

Checked: the workflow parses as YAML. The trust exchange can only be tested by a real run.

🤖 Generated with Claude Code

Replace the long-lived NUGET_API_KEY secret with NuGet/login, which
exchanges the workflow OIDC token for a short-lived API key right
before the pushes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ognjenkatic
ognjenkatic merged commit 564d442 into master Nov 10, 2026
1 check passed
@ognjenkatic
ognjenkatic deleted the ci/nuget-trusted-publishing branch November 10, 2026 09:32
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