name: Build for Linux on: pull_request: types: - opened - synchronize - reopened - ready_for_review paths-ignore: - "**.md" workflow_dispatch: inputs: branch: required: false default: "main" jobs: build-linux-app: name: Release Linux runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch }} fetch-depth: 0 - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev unzip webkit2gtk-4.1 libasound2-dev sudo apt-get install -y gcc g++ autoconf automake debhelper glslang-dev ladspa-sdk xutils-dev libasound2-dev \ libarchive-dev libbluray-dev libbs2b-dev libcaca-dev libcdio-paranoia-dev libdrm-dev \ libdav1d-dev libdvdnav-dev libegl1-mesa-dev libepoxy-dev libfontconfig-dev libfreetype6-dev \ libfribidi-dev libgl1-mesa-dev libgbm-dev libgme-dev libgsm1-dev libharfbuzz-dev libjpeg-dev \ libbrotli-dev liblcms2-dev libmodplug-dev libmp3lame-dev libopenal-dev \ libopus-dev libopencore-amrnb-dev libopencore-amrwb-dev libpulse-dev librtmp-dev \ libsdl2-dev libsixel-dev libssh-dev libsoxr-dev libspeex-dev libtool \ libv4l-dev libva-dev libvdpau-dev libvorbis-dev libvo-amrwbenc-dev \ libunwind-dev libvpx-dev libwayland-dev libx11-dev libxext-dev \ libxkbcommon-dev libxrandr-dev libxss-dev libxv-dev libxvidcore-dev \ linux-libc-dev nasm ninja-build pkg-config python3 python3-docutils wayland-protocols \ x11proto-core-dev zlib1g-dev libfdk-aac-dev libtheora-dev libwebp-dev \ unixodbc-dev libpq-dev libxxhash-dev libaom-dev \ libgtk-3-0 libblkid1 liblzma5 libmpv-dev shell: bash - name: Setup flutter uses: subosito/flutter-action@v2 with: channel: stable flutter-version-file: pubspec.yaml - name: Get Flutter dependencies run: flutter pub get shell: bash - name: Set and Extract version run: | dart lib/scripts/build.dart VERSION=$(cat pubspec.yaml | grep 'version:' | sed 's/version: //g' | tr -d '[:space:]') echo "version=$VERSION" >> $GITHUB_ENV shell: bash #TODO: deb and rpm packages need to be build - name: Build Linux run: flutter build linux --release -v - name: Package linux build output run: tar -zcvf PiliPlus_linux_${{ env.version }}_amd64.tar.gz -C build/linux/x64/release/bundle . - name: Upload linux outputs uses: actions/upload-artifact@v4 with: name: linux_outputs path: | PiliPlus_linux_*.tar.gz