name: Build Deb Packages on: push: branches: - '**' release: types: [published] jobs: build-deb: name: Deb build for ${{ matrix.image }} ${{ matrix.arch }} strategy: matrix: image: - "debian:bookworm" - "debian:trixie" - "ubuntu:jammy" - "ubuntu:noble" - "ubuntu:plucky" - "ubuntu:questing" # Add arm64 here for ARM builds arch: - "amd64" runs-on: codeberg-small-lazy container: image: codeberg.org/jwijenbergh/debbuilder-${{ matrix.image }}-${{ matrix.arch }} steps: - name: Checkout Repository run: git clone --depth 1 -b ${{ github.ref_name }} ${{ github.server_url }}/${{ github.repository }} common - name: Install build dependencies run: | cd common sudo apt-get update sudo apt-get build-dep -y . - name: Build Deb package run: | cd common dpkg-buildpackage -us -uc - name: Upload Deb if: github.event_name == 'release' && secrets.PACKAGE_TOKEN != '' run: | OWNER="${{ github.repository_owner }}" CODENAME="$(lsb_release -cs)" for DEB in $(find . -type f -name "*.deb"); do echo "uploading Deb: ${DEB}" curl --user "${OWNER}:${{ secrets.PACKAGE_TOKEN }}" \ --upload-file "${DEB}" \ "${{ github.server_url }}/api/packages/${OWNER}/debian/pool/${CODENAME}/main/upload?sign=true" done