Skip to content

Removed .net 4.7.2 to ensure building on non-windows machines #23

Removed .net 4.7.2 to ensure building on non-windows machines

Removed .net 4.7.2 to ensure building on non-windows machines #23

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
framework: [netstandard2.0, net8.0]
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build with ${{ matrix.framework }}
run: dotnet build --configuration Release --no-restore -f ${{ matrix.framework }}
- name: Test
run: dotnet test --no-restore --no-build --verbosity normal
- name: Pack
run: dotnet pack Karlssberg.Motiv/Karlssberg.Motiv.csproj --configuration Release --no-restore --no-build --output nupkgs
- name: Publish to NuGet
run: dotnet nuget push "nupkgs/**/*.nupkg" --api-key ${{secrets.motiv-api-key}} --source https://api.nuget.org/v3/index.json
if: github.ref == 'refs/heads/main'