name: Ubuntu CI

on: [push, pull_request, workflow_dispatch]

jobs:
  ubuntu-24-04-build:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v6
      - name: Get build dept.
        run: |
          sudo apt update
          sudo apt install cmake qt6-base-dev qt6-svg-dev qt6-tools-dev libexiv2-dev
      - name: Build it
        run: |
          mkdir build
          cd build
          cmake ../
          make
          cpack -G DEB
      - name: Try install it
        run: |
          cd build
          sudo apt install ./*.deb
      - uses: actions/upload-artifact@v6
        with:
          name: ubuntu-24.04-deb-package
          path: build/*.deb
