Skip publish in release for pull requests

This commit is contained in:
Peter Butzhammer
2024-02-07 11:05:26 +01:00
parent 8aaf3c1e7e
commit 1b7a85c7c5
2 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
name: .NET Core Build name: Prerelease
on: on:
push: push:

View File

@@ -1,4 +1,4 @@
name: .NET Core Build name: Release
on: on:
push: push:
@@ -28,6 +28,7 @@ jobs:
run: ./NUnit.ConsoleRunner.3.13.0/tools/nunit3-console.exe "Sharp7.Rx.Tests\bin\Release\net461\Sharp7.Rx.Tests.dll" run: ./NUnit.ConsoleRunner.3.13.0/tools/nunit3-console.exe "Sharp7.Rx.Tests\bin\Release\net461\Sharp7.Rx.Tests.dll"
- name: NugetPublish - name: NugetPublish
run: dotnet nuget push Sharp7.Rx\bin\Release\Sharp7.Rx.1.1.${{ github.run_number }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }} run: dotnet nuget push Sharp7.Rx\bin\Release\Sharp7.Rx.1.1.${{ github.run_number }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_DEPLOY_KEY }}
if: github.event_name != 'pull_request'
- name: Create Release - name: Create Release
id: create_release id: create_release
uses: actions/create-release@v1 uses: actions/create-release@v1
@@ -37,4 +38,5 @@ jobs:
tag_name: 1.1.${{ github.run_number }} tag_name: 1.1.${{ github.run_number }}
release_name: 1.1.${{ github.run_number }} release_name: 1.1.${{ github.run_number }}
draft: false draft: false
prerelease: true prerelease: true
if: github.event_name != 'pull_request'