Former-commit-id: 59ca76cdfa
This commit is contained in:
Malte Rosenbjerg 2020-05-13 00:12:04 +02:00
commit edd63f7d95

View file

@ -1,7 +1,6 @@
name: NuGet release name: NuGet release
on: on:
pull_request: push:
types: [opened, closed]
branches: branches:
- release - release
jobs: jobs:
@ -10,18 +9,15 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Prepare FFMpeg - name: Prepare FFMpeg
if: github.event.pull_request.merged == false
run: sudo apt-get update && sudo apt-get install -y ffmpeg run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Setup .NET Core - name: Setup .NET Core
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
with: with:
dotnet-version: 3.1.101 dotnet-version: 3.1
- name: Build solution -c Release - name: Build solution -c Release
run: dotnet build run: dotnet build
- name: Run unit tests - name: Run unit tests
if: github.event.pull_request.merged == false
run: dotnet test run: dotnet test
- name: Publish NuGet package - name: Publish NuGet package
if: github.event.pull_request.merged == true
run: NUPKG=`find . -type f -name FFMpegCore*.nupkg` && dotnet nuget push $NUPKG -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json run: NUPKG=`find . -type f -name FFMpegCore*.nupkg` && dotnet nuget push $NUPKG -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json