name: Build
on:
  push:
    paths-ignore:
    - '*.md'
    - 'docs/**'
  pull_request:
    paths-ignore:
    - '*.md'
    - 'docs/**'
env:
  DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
  DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    defaults:
      run:
        shell: pwsh
    steps:
    - name: Check out code
      uses: actions/checkout@v1
    - name: Set up .NET 5
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 5.0.100
    - name: Restore
      run: .\build.ps1 restore
    - name: Build
      run: .\build.ps1 build --skip restore
    - name: Test
      run: .\build.ps1 test --skip build
    - name: Publish
      if: runner.os == 'Windows' && github.repository_owner == 'Faithlife' && github.ref == 'refs/heads/master'
      env:
        BUILD_BOT_PASSWORD: ${{ secrets.BUILD_BOT_PASSWORD }}
        NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
      run: .\build.ps1 publish --skip test

name: Build
on:
  push:
    paths-ignore:
    - '*.md'
    - 'docs/**'
  pull_request:
    paths-ignore:
    - '*.md'
    - 'docs/**'
env:
  DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
  DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    defaults:
      run:
        shell: pwsh
    steps:
    - name: Check out code
      uses: actions/checkout@v1
    - name: Set up .NET Core 2.1
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '2.1.x'
    - name: Set up .NET 5
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '5.0.x'
    - name: Restore
      run: .\build.ps1 restore
    - name: Build
      run: .\build.ps1 build --skip restore
    - name: Test
      run: .\build.ps1 test --skip build
    - name: Publish
      if: runner.os == 'Windows' && github.repository_owner == 'Faithlife' && github.ref == 'refs/heads/master'
      env:
        BUILD_BOT_PASSWORD: ${{ secrets.BUILD_BOT_PASSWORD }}
        NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
      run: .\build.ps1 publish --skip test

Install .NET Core 2.1 for testing.
Install .NET Core 2.1 for testing.
