name: 'Download Qt'
description: 'Downloads Qt'
inputs:
  version:
    description: 'Qt version'
    required: false
    default: '6.2.4'
  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)
        (cygpath -w ${QTC_DIR} 2>/dev/null || echo ${QT_DIR}) >> ${GITHUB_PATH}
      shell: bash
