Skip to content

ci: Use NuGet trusted publishing via OIDC#186

Merged
khvn26 merged 1 commit intomainfrom
ci/nuget-trusted-publishing
Apr 17, 2026
Merged

ci: Use NuGet trusted publishing via OIDC#186
khvn26 merged 1 commit intomainfrom
ci/nuget-trusted-publishing

Conversation

@khvn26
Copy link
Copy Markdown
Member

@khvn26 khvn26 commented Apr 17, 2026

In this PR, we add Nuget trusted publishing.

Prerequisites (done out-of-band)

  • Trusted Publishing policy created on nuget.org: owner Flagsmith, repo flagsmith-dotnet-client, workflow release.yml, no environment.
  • Flagsmith org added as co-owner of all Flagsmith.* packages published by this workflow.
  • Repo variable NUGET_USER set.

Test plan

  • Merge PR.
  • On the next release-please release merge, confirm the Publish Release workflow's NuGet login (OIDC -> temp API key) step succeeds and masks the output.
  • Confirm dotnet nuget push succeeds for all Flagsmith.*.nupkg (excluding Flagsmith.Engine* per existing artifact filter).
  • After first successful publish, revoke the old NUGET_APIKEY on nuget.org and delete the GitHub secret.

Rollback

Restore NUGET_APIKEY secret and revert this PR — one-minute operation.

Replace the long-lived NUGET_APIKEY secret with short-lived, single-use
API keys obtained by exchanging a GitHub Actions OIDC token at
nuget.org. Requires a Trusted Publishing policy configured on nuget.org
for this repo + `release.yml`, and a `NUGET_USER` repo variable set to
the nuget.org profile name of a member of the policy-owning org.

See https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing

beep boop
@khvn26 khvn26 requested a review from a team as a code owner April 17, 2026 18:45
@khvn26 khvn26 requested review from emyller and removed request for a team April 17, 2026 18:45
@khvn26 khvn26 merged commit 44a9201 into main Apr 17, 2026
15 checks passed
@khvn26 khvn26 deleted the ci/nuget-trusted-publishing branch April 17, 2026 18:53
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