name: ci

env:
  PROJECT_NAME: Lunet

on:
  push:
    paths-ignore:
    - 'doc/**'
    - 'img/**'
    - 'changelog.md'
    - 'readme.md'
  pull_request:

jobs:
  build:
    runs-on: windows-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v1

    - name: Install .NET 5.0
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '5.0.x'

    - name: Install .NET Core 3.1
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '3.1.x'

    - name: Build & test (Release)
      run: dotnet test src -c Release

    - name: Pack
      run: |
          dotnet pack src -c Release

    - name: Publish
      if: github.event_name == 'push'
      run: |
          if ( "${{github.ref}}" -match "^refs/tags/[0-9]+\.[0-9]+\.[0-9]+" ) {
              dotnet nuget push src\${{env.PROJECT_NAME}}\bin\Release\*.nupkg -s nuget.org -k ${{secrets.NUGET_TOKEN}}
          } else {
              echo "publish is only enabled by tagging with a release tag"
          }

name: ci

env:
  PROJECT_NAME: Lunet

on:
  push:
    paths-ignore:
    - 'doc/**'
    - 'img/**'
    - 'changelog.md'
    - 'readme.md'
  pull_request:

jobs:
  build:
    runs-on: windows-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v1

    - name: Install .NET 6.0
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '6.0.x'

    - name: Build & test (Release)
      run: dotnet test src -c Release

    - name: Pack
      run: |
          dotnet pack src -c Release

    - name: Publish
      if: github.event_name == 'push'
      run: |
          if ( "${{github.ref}}" -match "^refs/tags/[0-9]+\.[0-9]+\.[0-9]+" ) {
              dotnet nuget push src\${{env.PROJECT_NAME}}\bin\Release\*.nupkg -s nuget.org -k ${{secrets.NUGET_TOKEN}}
          } else {
              echo "publish is only enabled by tagging with a release tag"
          }

Fix CI to use net6.0
Fix CI to use net6.0
