2020-02-21 17:36:12 +01:00
|
|
|
name: NuGet release
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- release
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- release
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Prepare FFMpeg
|
2020-02-21 17:53:01 +01:00
|
|
|
if: github.event.pull_request.merged == false
|
2020-02-21 17:36:12 +01:00
|
|
|
run: sudo apt-get update && sudo apt-get install -y ffmpeg
|
|
|
|
- name: Setup .NET Core
|
|
|
|
uses: actions/setup-dotnet@v1
|
|
|
|
with:
|
|
|
|
dotnet-version: 3.1.101
|
|
|
|
- name: Build solution -c Release
|
|
|
|
run: dotnet build
|
|
|
|
- name: Run unit tests
|
2020-02-21 17:53:01 +01:00
|
|
|
if: github.event.pull_request.merged == false
|
2020-02-21 17:36:12 +01:00
|
|
|
run: dotnet test
|
|
|
|
- name: Publish NuGet package
|
2020-02-21 17:53:01 +01:00
|
|
|
if: github.event.pull_request.merged == true
|
2020-02-21 17:36:12 +01:00
|
|
|
run: NUPKG=`find . -type f -name FFMpegCore*.nupkg` && dotnet nuget push $NUPKG -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json
|
|
|
|
|