ArchiveBox/.github/workflows/debian.yml
Claude f3fcc1584c
Restore Homebrew and Debian package manager support
- Add Homebrew formula (brew_dist/archivebox.rb) using virtualenv pattern
  with auto-generation via homebrew-pypi-poet in bin/build_brew.sh
- Add Debian packaging via nFPM (pkg/debian/) with thin .deb that pip-installs
  archivebox into /opt/archivebox/venv on postinstall
- Add build/release scripts: bin/{build,release}_{brew,deb}.sh
- Update CI workflows to build packages on release and test them
- Update README apt/brew install instructions with working commands
- Update bin/setup.sh to use .deb download instead of old Launchpad PPA

https://claude.ai/code/session_01Vx1EsNrNySgsc8Y67dGzCn
2026-03-15 00:19:50 +00:00

69 lines
1.8 KiB
YAML

name: Build Debian package
on:
workflow_dispatch:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
arch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Get version
id: version
run: echo "version=$(grep '^version = ' pyproject.toml | awk -F'\"' '{print $2}')" >> "$GITHUB_OUTPUT"
- name: Install nfpm
run: |
curl -sfL https://install.goreleaser.com/github.com/goreleaser/nfpm.sh | sh -s -- -b /usr/local/bin
- name: Build .deb package
run: |
export VERSION="${{ steps.version.outputs.version }}"
export ARCH="${{ matrix.arch }}"
./bin/build_deb.sh
- name: Upload .deb artifact
uses: actions/upload-artifact@v4
with:
name: archivebox-${{ steps.version.outputs.version }}-${{ matrix.arch }}.deb
path: dist/*.deb
- name: Upload .deb to GitHub Release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.event.release.tag_name }}" dist/*.deb --clobber
test:
needs: build
runs-on: ubuntu-24.04
steps:
- name: Download .deb artifact
uses: actions/download-artifact@v4
with:
pattern: archivebox-*-amd64.deb
merge-multiple: true
- name: Install .deb package
run: |
sudo apt-get update -qq
sudo apt-get install -y python3 python3-pip python3-venv nodejs npm git wget curl ripgrep
sudo dpkg -i archivebox*.deb || sudo apt-get install -f -y
- name: Test archivebox CLI
run: |
archivebox version
mkdir -p /tmp/archivebox-test && cd /tmp/archivebox-test
archivebox init --setup