Skip to content

Switch NuGet publishing to Trusted Publishing (OIDC)#75

Merged
corpo-iwillspeak merged 3 commits into
mainfrom
copilot/switch-to-trusted-publishing
Apr 13, 2026
Merged

Switch NuGet publishing to Trusted Publishing (OIDC)#75
corpo-iwillspeak merged 3 commits into
mainfrom
copilot/switch-to-trusted-publishing

Conversation

Copilot AI commented Apr 1, 2026

Copy link
Copy Markdown
Contributor
  • Update .github/workflows/publish.yml to use Trusted Publishing (OIDC) model
  • Scope permissions per-job with least privilege (address reviewer feedback):
    • Remove top-level permissions block
    • build job: contents: read, checks: write (for test reporter)
    • deploy job: packages: write (GitHub Packages), id-token: write (OIDC)

Agent-Logs-Url: https://github.com/crispthinking/PdqHash/sessions/4d5046f6-12ed-4351-9bff-643d341ef568

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
Copilot AI changed the title [WIP] Switch to TrustedPublishing model for PDQ publishing Switch NuGet publishing to Trusted Publishing (OIDC) Apr 1, 2026
Copilot AI requested a review from corpo-iwillspeak April 1, 2026 11:56
@corpo-iwillspeak corpo-iwillspeak marked this pull request as ready for review April 1, 2026 11:58
@corpo-iwillspeak corpo-iwillspeak requested a review from Copilot April 1, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the NuGet publishing GitHub Actions workflow to use nuget.org Trusted Publishing via OIDC instead of a long-lived NUGET_APIKEY secret.

Changes:

  • Adds workflow permissions including id-token: write to enable OIDC token exchange.
  • Introduces a NuGet/login@v1 step (release-only) to obtain a short-lived NuGet API key.
  • Switches nuget.org publish to use steps.login.outputs.NUGET_API_KEY instead of secrets.NUGET_APIKEY.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/publish.yml Outdated
ghost
ghost previously approved these changes Apr 1, 2026

@corpo-iwillspeak corpo-iwillspeak 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.

Address the selected PR comment

Comment thread .github/workflows/publish.yml Outdated
Agent-Logs-Url: https://github.com/crispthinking/PdqHash/sessions/616ec821-bb44-4f25-9f9f-6b4cbfad9db9

Co-authored-by: corpo-iwillspeak <265613520+corpo-iwillspeak@users.noreply.github.com>
Copilot AI dismissed ghost ’s stale review via b5e6533 April 7, 2026 09:22

Copilot AI commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

Address the selected PR comment

Done in b5e6533. Removed the top-level permissions block and scoped them per-job:

  • build: contents: read, checks: write (for dorny/test-reporter)
  • deploy: packages: write (GitHub Packages), id-token: write (OIDC)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/publish.yml
@corpo-iwillspeak corpo-iwillspeak merged commit 55f8599 into main Apr 13, 2026
6 checks passed
@corpo-iwillspeak corpo-iwillspeak deleted the copilot/switch-to-trusted-publishing branch April 13, 2026 14:50
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.

4 participants