Skip to content

Commit fb707aa

Browse files
committed
push to nuget only on tags
1 parent 147dbc8 commit fb707aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/nuget-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
name: ${{ matrix.os }}-nuget-package
5454
path: artifacts/*.nupkg
5555

56-
# Push to NuGet.org using C# build target (Windows only, not on PRs)
56+
# Push to NuGet.org only for version tag pushes (Windows only)
5757
- name: Push to NuGet
58-
if: success() && matrix.os == 'windows-latest' && github.event_name != 'pull_request'
58+
if: success() && matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/tags/')
5959
run: dotnet run --project build/build.csproj -- push-to-nuget
6060
env:
6161
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

0 commit comments

Comments
 (0)