Skip to content

Enable NuGet trusted publishing - #391

Merged
damianh merged 3 commits into
mainfrom
dh/nuget-trusted-publishing
Nov 4, 2026
Merged

damianh merged 3 commits into
mainfrom
dh/nuget-trusted-publishing

Conversation

@damianh

@damianh damianh commented Nov 4, 2026

Copy link
Copy Markdown
Member

What issue does this PR address?

Replace the long-lived nuget.org API key with NuGet trusted publishing via GitHub OIDC. The release job now fails closed if trusted authentication does not provide a temporary key, while preserving the existing environment approval, signing, and GitHub Packages publishing. Adds a procedure for configuring NUGET_USER, the nuget.org trust policy, and release verification.

Validation: go run github.com/rhysd/actionlint/cmd/actionlint@latest .github/workflows/release.yml passed; git diff --check passed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 21:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The publishing action uses a mutable tag, allowing unreviewed code changes with access to the publishing OIDC token and temporary NuGet key.

2 open issues
What changed in this PR

Migrates nuget.org releases from a long-lived API key to trusted publishing through GitHub OIDC, preserving environment approval, package signing, and GitHub Packages publishing.

Changes:

  • Grants the publishing job OIDC permission and adds NuGet authentication.
  • Uses the temporary API key and fails publication if no key is returned.
  • Documents identity configuration, trust policy setup, and release verification.
File Description
docs/​engineering/​procedures/​nuget-trusted-publishing.md Documents trusted publishing setup and verification.
.github/​workflows/​release.yml Replaces the stored NuGet key with OIDC-based authentication and a missing-key guard.

Review effort: Balanced

Comment thread .github/workflows/release.yml Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 21:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the replacement of the long-lived NuGet API key with OIDC-based trusted publishing.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@damianh
damianh enabled auto-merge November 4, 2026 22:04
@damianh
damianh disabled auto-merge November 4, 2026 22:04
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 22:06
@damianh
damianh enabled auto-merge (squash) November 4, 2026 22:06
@damianh
damianh disabled auto-merge November 4, 2026 22:06
@damianh
damianh merged commit a5748b6 into main Nov 4, 2026
2 checks passed
@damianh
damianh deleted the dh/nuget-trusted-publishing branch November 4, 2026 22:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were reported for the switch from a long-lived NuGet API key to OIDC trusted publishing.

No open issues 🎉

Review effort: Balanced

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.

2 participants