name: 'Download Qt'
description: 'Downloads Qt'
inputs:
  version:
    description: 'Qt version'
    required: false
    default: '6.8.3'
  target:
    description: 'Qt target (desktop, ios, android)'
    required: false
    default: 'desktop'
  toolchain:
    description: 'Qt toolchain'
    required: true
runs:
  using: "composite"
  steps:
    - name: Install Qt
      run: |
        QT_DIR=$(./scripts/install-qt.sh -d $HOME/Qt --version ${{ inputs.version }} --target ${{ inputs.target }} --toolchain ${{ inputs.toolchain }} qtbase qtdeclarative qttools qtscxml qt5compat qtshadertools)
        (cygpath -w ${QT_DIR} 2>/dev/null || echo ${QT_DIR}) >> ${GITHUB_PATH}
      shell: bash
