Environment get overridden by previous job

When testing multiple operating systems, the environment variable is overridden by the same previous OS, if the same.

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest, ubuntu-latest]
        include:
        - os: macos-latest
          TARGET: x86_64-apple-darwin

        - os: ubuntu-latest
          TARGET: armv7-unknown-linux-musleabihf

        - os: ubuntu-latest
          TARGET: x86_64-unknown-linux-musl

    steps:
    - name: Building ${{ matrix.TARGET }}
      run: echo "${{ matrix.TARGET }}"

This results in:

Building x86_64-apple-darwin
Building x86_64-unknown-linux-musl
Building x86_64-unknown-linux-musl

Hi @patrickelectric ,

Please change the configuration options like as below, it can meet the result as your expectation:

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest]
        TARGET: [x86_64-apple-darwin, armv7-unknown-linux-musleabihf, x86_64-unknown-linux-musl]
        exclude:
        - os: macos-latest
          TARGET: armv7-unknown-linux-musleabihf
        - os: macos-latest
          TARGET: x86_64-unknown-linux-musl
        - os: ubuntu-latest
          TARGET: x86_64-apple-darwin