title: Use YAML key depending on OS
body: <p>I'm trying to change the path of a executable depending on the OS. This is what I have tried:</p>
  <pre class="lang-yaml prettyprint-override"><code>name: PyInstaller
  
  on:
    push:
      branches: [ main ]
    pull_request:
      branches: [ main ]
  
    workflow_dispatch:
  
  
  jobs:
    PyInstaller:
      strategy:
        matrix:
          os: [ macos-latest, windows-latest ]
          include:
            - os: macos-latest
              release_suffix: mac
            - os: windows-latest
              release_suffix: windows
      runs-on: ${{ matrix.os }}
  
      steps:
        - uses: actions/checkout@v2
  
        - name: Set up Python 3.10
          uses: actions/setup-python@v2
          with:
            python-version: &quot;3.10&quot;
  
        - name: Install dependencies
          run: |
            python -m pip install --upgrade pip
            pip install -r requirements.txt
            
        - name: Run PyInstaller
          run: |
            pyinstaller &quot;Qr Rechnung.spec&quot;
  
        - name: Upload artifact
          uses: actions/upload-artifact@v3
          with:
            name: &quot;Qr Rechnung&quot;
            if ${{ matrix.os }} == &quot;macos-latest&quot;
            path: &quot;dist/Qr Rechnung.app&quot;
            elif ${{ matrix.os }} == &quot;windows-latest&quot;
            path: &quot;dist/Qr Rechnung.exe&quot;
  </code></pre>
  <p>But the last part does not work. How can I change the path key depending on the OS? The if does not work as I would expect, it says path is redefined</p>