diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 333e87fe8..4842ce9c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,6 +63,13 @@ jobs: tag: ${{ env.RELEASE }} makeLatest: true + - name: Share binary with packaging jobs + uses: actions/upload-artifact@v4 + with: + name: lightpanda-${{ env.ARCH }}-${{ env.OS }} + path: lightpanda-${{ env.ARCH }}-${{ env.OS }} + retention-days: 1 + build-linux-aarch64: env: ARCH: aarch64 @@ -103,6 +110,13 @@ jobs: tag: ${{ env.RELEASE }} makeLatest: true + - name: Share binary with packaging jobs + uses: actions/upload-artifact@v4 + with: + name: lightpanda-${{ env.ARCH }}-${{ env.OS }} + path: lightpanda-${{ env.ARCH }}-${{ env.OS }} + retention-days: 1 + build-macos-aarch64: env: ARCH: aarch64 @@ -184,3 +198,75 @@ jobs: artifacts: lightpanda-${{ env.ARCH }}-${{ env.OS }} tag: ${{ env.RELEASE }} makeLatest: true + + 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-x86_64 + - build-linux-aarch64 + 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 <