From d122217f61ac32034947f1255fe18ffd2dea0915 Mon Sep 17 00:00:00 2001 From: Petros Likidis Date: Tue, 25 Aug 2026 09:03:17 +0200 Subject: [PATCH] Changed pipeline to use trusted publishing --- .github/workflows/nuget.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index c388773..0ab4e77 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -22,6 +22,13 @@ jobs: - uses: NuGet/setup-nuget@fd55a6f3b34392fa83fde1454582407d8c714123 # v4.0 + # Get a short-lived NuGet API key + - name: NuGet login (OIDC → temp API key) + uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 + id: login + with: + user: ${{ secrets.NUGET_USER }} + - name: Restore NuGet packages run: nuget restore @@ -33,4 +40,4 @@ jobs: $package = Get-ChildItem -Recurse -Filter *.nupkg nuget push $package $env:nuget_api_key -src https://nuget.org env: - nuget_api_key: ${{ secrets.NUGET_API_KEY }} + nuget_api_key: ${{ steps.login.outputs.NUGET_API_KEY }}