name: Build

on:
  push:
    branches: [ master, deploy ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    name: ${{ matrix.os }}
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ macos-latest, ubuntu-latest, windows-latest ]

    steps:
    - name: Checkout code
      uses: actions/checkout@v2
    - name: Setup .NET Core SDK
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.200
    - name: Build, Test and Publish
      shell: pwsh
      run: ./Build.ps1
      env:
        DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
        NUGET_XMLDOC_MODE: skip
    - uses: codecov/codecov-action@v1
      name: Upload coverage to Codecov
      with:
        file: ./artifacts/coverage.cobertura.xml
        flags: ${{ process.platform }}

name: Build

on:
  push:
    branches: [ master, deploy ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    name: ${{ matrix.os }}
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ macos-latest, ubuntu-latest, windows-latest ]

    steps:
    - name: Checkout code
      uses: actions/checkout@v2
    - name: Setup .NET Core SDK
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 3.1.200
    - name: Build, Test and Publish
      shell: pwsh
      run: ./Build.ps1
      env:
        DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
        NUGET_XMLDOC_MODE: skip
    - uses: codecov/codecov-action@v1
      name: Upload coverage to Codecov
      with:
        file: ./artifacts/coverage.cobertura.xml
        flags: ${{ matrix.os }}

Use matrix.os for codecov flags
Use matrix.os for codecov flags

Use the matrix OS instead of process.platform, which doesn't work.
