Environment in matrix substitution not work as expected

I have a strategy configurations like the following.

        os: [ubuntu-latest, windows-latest, macOS-latest]
          - os: ubuntu-latest
            output-name: ${GITHUB_REPOSITORY##*/}-linux
          - os: macOS-latest
            output-name: ${GITHUB_REPOSITORY##*/}-mac
          - os: windows-latest
            output-name: ${GITHUB_REPOSITORY##*/}-windows.exe

However in the following steps where I use ${{ matrix.output-name }} in windows-latest environment, I got the incorrect -windows.exe.

How did you use ${{ matrix.output-name }} in the next steps? If it is a run step, in windows it will use powershell as the default shell. You could specify shell to use bash. 

- name: matrix
      run: |
          echo ${{ matrix.output-name }}
      shell: bash

I can get the correct environment value using bash shell, but using this type shell will lead me to another path problem https://github.community/t5/GitHub-Actions/PATH-of-bash-shell-in-Windows-is-not-correct/m-p/49789/highlight/false#M7607.