Skip to content

Use NuGet Trusted Publishing for nugettest.org push instead of API key - #253

Merged
stesee merged 1 commit into
mainfrom
nugettest-trusted-publishing
Nov 2, 2026
Merged

stesee merged 1 commit into
mainfrom
nugettest-trusted-publishing

Conversation

@stesee

@stesee stesee commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Switches the deployTest job (pushes to int.nugettest.org on main) from the NUGET_TEST_TOKEN API key to NuGet Trusted Publishing (OIDC), matching the deployRelease job.

  • Adds id-token: write to the job
  • Logs in with NuGet/login@v1 against https://int.nugettest.org/api/v2/token, with audience https://int.nugettest.org
  • Pushes with the short-lived key from the login step
  • The job only runs when the NUGET_TEST_USER secret is set, the same way it used to depend on NUGET_TEST_TOKEN

Setup needed before merging:

  • Create a trusted publishing policy on int.nugettest.org for owner Codeuctivity, repository OpenXmlPowerTools, workflow dotnet.yml, environment empty
  • Add the repo secret NUGET_TEST_USER, set to the int.nugettest.org username of the person who created the policy
  • Once this works, NUGET_TEST_TOKEN can be deleted

Copilot AI balanced review requested due to automatic review settings November 2, 2026 05:55

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@stesee
stesee merged commit 602b722 into main Nov 2, 2026
6 checks passed
@stesee
stesee deleted the nugettest-trusted-publishing branch November 2, 2026 06:08
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants