Skip to content

Merge develop branch #419

Merge develop branch

Merge develop branch #419

Workflow file for this run

name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
working-directory: ./src
run: dotnet restore
- name: Build
working-directory: ./src
run: dotnet build --configuration Release --no-restore /p:NoWarn=1591
- name: Test
working-directory: ./src
run: dotnet test --configuration Release --no-restore --no-build --verbosity normal
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
working-directory: ./src
run: dotnet restore
- name: Build
working-directory: ./src
run: dotnet build --configuration Release --no-restore /p:NoWarn=1591
- name: Test
working-directory: ./src
run: dotnet test --configuration Release --no-restore --no-build --verbosity normal
- name: Build project and generate NuGet package
run: |
dotnet pack --configuration Release --output $GITHUB_WORKSPACE/out src/BinaryKits.Zpl.Label/BinaryKits.Zpl.Label.csproj
dotnet pack --configuration Release --output $GITHUB_WORKSPACE/out src/BinaryKits.Zpl.Labelary/BinaryKits.Zpl.Labelary.csproj
dotnet pack --configuration Release --output $GITHUB_WORKSPACE/out src/BinaryKits.Zpl.Viewer/BinaryKits.Zpl.Viewer.csproj
dotnet pack --configuration Release --output $GITHUB_WORKSPACE/out src/BinaryKits.Zpl.Protocol/BinaryKits.Zpl.Protocol.csproj
- name: Push NuGet package
if: github.event_name != 'pull_request' && github.repository_owner == 'BinaryKits'
run: |
cd $GITHUB_WORKSPACE/out
dotnet nuget push *.nupkg --source https://www.nuget.org/api/v2/package --api-key ${{secrets.NUGET_TOKEN}} --skip-duplicate --no-symbols