From 233d08cd6ea5c9336e299de09378a44e6c7afb48 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 24 Apr 2026 15:23:25 +0200 Subject: [PATCH 1/2] ci: generate a .deb package on tag --- .github/workflows/release.yml | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62f751983..0a5e7d894 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -201,3 +201,72 @@ jobs: artifacts: pkg/lightpanda-${{ env.PKGVER }}-${{ env.PKGREL }}-${{ env.ARCH }}.pkg.tar.zst tag: ${{ env.RELEASE }} makeLatest: true + + package-debian: + if: github.ref_type == 'tag' + strategy: + fail-fast: false + matrix: + include: + - arch: x86_64 + deb_arch: amd64 + - arch: aarch64 + deb_arch: arm64 + + env: + ARCH: ${{ matrix.arch }} + DEB_ARCH: ${{ matrix.deb_arch }} + OS: linux + + needs: build-linux + runs-on: ubuntu-22.04 + container: debian:stable-slim + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v6 + + - name: Install packaging deps + run: | + apt-get update + apt-get install -y --no-install-recommends dpkg-dev + + - name: Download linux binary + uses: actions/download-artifact@v4 + with: + name: lightpanda-${{ env.ARCH }}-${{ env.OS }} + path: . + + - name: Build Debian package + run: | + RAW_VERSION="${{ env.RELEASE }}" + PKGVER="${RAW_VERSION#v}" + echo "PKGVER=${PKGVER}" >> "$GITHUB_ENV" + + ROOT="lightpanda_${PKGVER}_${DEB_ARCH}" + mkdir -p "$ROOT/DEBIAN" "$ROOT/usr/bin" "$ROOT/usr/share/doc/lightpanda" + + install -m755 "lightpanda-${ARCH}-${OS}" "$ROOT/usr/bin/lightpanda" + install -m644 LICENSE "$ROOT/usr/share/doc/lightpanda/copyright" + + cat > "$ROOT/DEBIAN/control" <= 2.35) + Maintainer: Lightpanda + Homepage: https://lightpanda.io + Description: Lightpanda, headless browser built for AI and automation + EOF + + dpkg-deb --build --root-owner-group "$ROOT" + + - name: Upload Debian package to release + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + artifacts: lightpanda_${{ env.PKGVER }}_${{ env.DEB_ARCH }}.deb + tag: ${{ env.RELEASE }} + makeLatest: true From 876712730869f7bd21c9ffd5cb719580e40b2944 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 24 Apr 2026 15:37:02 +0200 Subject: [PATCH 2/2] ci: split package release into sub files --- .github/workflows/package-archlinux.yml | 79 ++++++++++++++ .github/workflows/package-debian.yml | 78 ++++++++++++++ .github/workflows/release.yml | 133 +----------------------- 3 files changed, 159 insertions(+), 131 deletions(-) create mode 100644 .github/workflows/package-archlinux.yml create mode 100644 .github/workflows/package-debian.yml diff --git a/.github/workflows/package-archlinux.yml b/.github/workflows/package-archlinux.yml new file mode 100644 index 000000000..dba6d2d0b --- /dev/null +++ b/.github/workflows/package-archlinux.yml @@ -0,0 +1,79 @@ +name: package archlinux + +on: + workflow_call: + +permissions: + contents: write + +env: + RELEASE: ${{ github.ref_type == 'tag' && github.ref_name || 'nightly' }} + +jobs: + package: + strategy: + fail-fast: false + matrix: + arch: [x86_64, aarch64] + + env: + ARCH: ${{ matrix.arch }} + OS: linux + + runs-on: ubuntu-22.04 + container: archlinux:latest + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v6 + + - name: Install packaging deps + run: pacman -Syu --noconfirm --needed base-devel sudo + + - name: Download linux binary + uses: actions/download-artifact@v4 + with: + name: lightpanda-${{ env.ARCH }}-${{ env.OS }} + path: . + + - name: Build Arch package + run: | + useradd -m builder + echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + + RAW_VERSION="${{ env.RELEASE }}" + PKGVER="${RAW_VERSION#v}" + PKGREL="1" + echo "PKGVER=${PKGVER}" >> "$GITHUB_ENV" + echo "PKGREL=${PKGREL}" >> "$GITHUB_ENV" + + mkdir -p pkg + cp lightpanda-${{ env.ARCH }}-${{ env.OS }} pkg/ + cp LICENSE pkg/ + + cat > pkg/PKGBUILD <> "$GITHUB_ENV" + + ROOT="lightpanda_${PKGVER}_${DEB_ARCH}" + mkdir -p "$ROOT/DEBIAN" "$ROOT/usr/bin" "$ROOT/usr/share/doc/lightpanda" + + install -m755 "lightpanda-${ARCH}-${OS}" "$ROOT/usr/bin/lightpanda" + install -m644 LICENSE "$ROOT/usr/share/doc/lightpanda/copyright" + + cat > "$ROOT/DEBIAN/control" <= 2.35) + Maintainer: Lightpanda + Homepage: https://lightpanda.io + Description: Lightpanda, headless browser built for AI and automation + EOF + + dpkg-deb --build --root-owner-group "$ROOT" + + - name: Upload Debian package to release + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + artifacts: lightpanda_${{ env.PKGVER }}_${{ env.DEB_ARCH }}.deb + tag: ${{ env.RELEASE }} + makeLatest: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a5e7d894..11e4b87e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -134,139 +134,10 @@ jobs: package-archlinux: if: github.ref_type == 'tag' - strategy: - fail-fast: false - matrix: - arch: [x86_64, aarch64] - - env: - ARCH: ${{ matrix.arch }} - OS: linux - needs: build-linux - runs-on: ubuntu-22.04 - container: archlinux:latest - timeout-minutes: 10 - - steps: - - uses: actions/checkout@v6 - - - name: Install packaging deps - run: pacman -Syu --noconfirm --needed base-devel sudo - - - name: Download linux binary - uses: actions/download-artifact@v4 - with: - name: lightpanda-${{ env.ARCH }}-${{ env.OS }} - path: . - - - name: Build Arch package - run: | - useradd -m builder - echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers - - RAW_VERSION="${{ env.RELEASE }}" - PKGVER="${RAW_VERSION#v}" - PKGREL="1" - echo "PKGVER=${PKGVER}" >> "$GITHUB_ENV" - echo "PKGREL=${PKGREL}" >> "$GITHUB_ENV" - - mkdir -p pkg - cp lightpanda-${{ env.ARCH }}-${{ env.OS }} pkg/ - cp LICENSE pkg/ - - cat > pkg/PKGBUILD <> "$GITHUB_ENV" - - ROOT="lightpanda_${PKGVER}_${DEB_ARCH}" - mkdir -p "$ROOT/DEBIAN" "$ROOT/usr/bin" "$ROOT/usr/share/doc/lightpanda" - - install -m755 "lightpanda-${ARCH}-${OS}" "$ROOT/usr/bin/lightpanda" - install -m644 LICENSE "$ROOT/usr/share/doc/lightpanda/copyright" - - cat > "$ROOT/DEBIAN/control" <= 2.35) - Maintainer: Lightpanda - Homepage: https://lightpanda.io - Description: Lightpanda, headless browser built for AI and automation - EOF - - dpkg-deb --build --root-owner-group "$ROOT" - - - name: Upload Debian package to release - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - artifacts: lightpanda_${{ env.PKGVER }}_${{ env.DEB_ARCH }}.deb - tag: ${{ env.RELEASE }} - makeLatest: true + uses: ./.github/workflows/package-debian.yml