From 59265173b46f899fce013c705c1896a0dfa80621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87etinkaya?= Date: Thu, 9 May 2024 20:01:24 +0300 Subject: [PATCH] ci: update NuGet publishing workflow to use new API key secret --- .github/workflows/nuget-publish.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nuget-publish.yml b/.github/workflows/nuget-publish.yml index 8ccf6e2..4c2e3bd 100644 --- a/.github/workflows/nuget-publish.yml +++ b/.github/workflows/nuget-publish.yml @@ -12,15 +12,12 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Restore NuGet packages - run: dotnet restore - - name: Build and publish NuGet package env: - NUGET_PUBLISHER_TOKEN: ${{ secrets.NUGET_PUBLISHER_TOKEN }} + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} run: | - dotnet build --no-restore - nuget push -ApiKey $NUGET_PUBLISHER_TOKEN -Source https://www.nuget.org/api/v2/package -Verbosity Detailed - - - name: Clean up - run: rm -rf bin + dotnet restore + dotnet build --configuration Release + dotnet pack --configuration Release --no-build + dotnet nuget push **/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json + dotnet clean