From fb707aa6764afc1c94263dd60c7b1171487791c3 Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Thu, 12 Feb 2026 10:56:26 +0000 Subject: [PATCH] push to nuget only on tags --- .github/workflows/nuget-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nuget-release.yml b/.github/workflows/nuget-release.yml index 253a93ed..548ca8eb 100644 --- a/.github/workflows/nuget-release.yml +++ b/.github/workflows/nuget-release.yml @@ -53,9 +53,9 @@ jobs: name: ${{ matrix.os }}-nuget-package path: artifacts/*.nupkg - # Push to NuGet.org using C# build target (Windows only, not on PRs) + # Push to NuGet.org only for version tag pushes (Windows only) - name: Push to NuGet - if: success() && matrix.os == 'windows-latest' && github.event_name != 'pull_request' + if: success() && matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/tags/') run: dotnet run --project build/build.csproj -- push-to-nuget env: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}