Removed .net 4.7.2 to ensure building on non-windows machines #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |