From d6d463524d2cb7acc70d95c895bc622554eb2477 Mon Sep 17 00:00:00 2001 From: "M.P. Korstanje" Date: Wed, 6 May 2026 19:26:17 +0200 Subject: [PATCH] Use Trusted Publishing for NuGet --- .github/workflows/release-nuget.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-nuget.yaml b/.github/workflows/release-nuget.yaml index b0880563..b9d06a2d 100644 --- a/.github/workflows/release-nuget.yaml +++ b/.github/workflows/release-nuget.yaml @@ -19,7 +19,12 @@ jobs: uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 with: dotnet-version: 10.0.x + - name: NuGet login (OIDC → temp API key) + uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0 + id: login + with: + user: ${{ secrets.NUGET_USER }} - uses: cucumber/action-publish-nuget@f059d15b2dbcd962afc0d29424f4f083177255aa # v1.0.0 with: - nuget-api-key: ${{ secrets.NUGET_API_KEY }} - working-directory: "dotnet" \ No newline at end of file + nuget-api-key: ${{ steps.login.outputs.NUGET_API_KEY }} + working-directory: "dotnet"