# This is a basic workflow to help you get started with Actions

name: push-build-check

# Controls when the workflow will run
on: push
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: windows-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v3
    
      - name: install qt static
        uses: orestonce/install-qt-static@v0.4.2
        with:
          version: Qt5.6.3-Windows-x86-MinGW4.9.4-staticFull-20200104
          dir: qt_static_install
      - name: Setup Go environment
        uses: actions/setup-go@v3.2.1
        with:
          # The Go version to download (if necessary) and use. Supports semver spec and ranges.
          go-version: 1.18 # optional
      - name: build
        run: |
          go mod tidy
          go run export/main.go check-only
          cd m3u8d-qt && qmake && mingw32-make release && cd ..
          dir m3u8d-qt\release\m3u8d-qt.exe
