name: Build LibrePods Linux

on:
  workflow_dispatch:
#  push:
#    branches:
#      - '*'

jobs:
  build-linux:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Install dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y build-essential cmake ninja-build \
            qt6-base-dev qt6-declarative-dev qt6-svg-dev \
            qt6-tools-dev qt6-tools-dev-tools qt6-connectivity-dev \
            libxkbcommon-dev

      - name: Build project
        working-directory: linux
        run: |
          mkdir build
          cd build
          cmake .. -G Ninja
          ninja

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: librepods-linux
          path: linux/build/librepods
