1
0
Fork 0
mirror of synced 2024-06-27 02:20:36 +12:00
ArchiveBox/.github/workflows/debian.yml
2020-12-11 19:23:10 +02:00

72 lines
2.1 KiB
YAML

name: Build Debian package
on:
workflow_dispatch:
push:
env:
SETUPTOOLS_USE_DISTUTILS: local
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 1
# - name: Set up Python
# uses: actions/setup-python@v1
# with:
# python-version: 3.9
# architecture: x64
- name: Install packaging dependencies
run: |
sudo apt install -y python3 python3-dev python3-pip python3-venv python3-all dh-python debhelper devscripts dput software-properties-common python3-distutils python3-setuptools python3-wheel python3-stdeb
# pip3 install --upgrade pip setuptools wheel stdeb
- name: Build Debian/Apt sdist_dsc
run: |
rm -Rf deb_dist/*
python3 setup.py --command-packages=stdeb.command sdist_dsc
- name: Build Debian/Apt bdist_deb
run: |
python3 setup.py --command-packages=stdeb.command bdist_deb
- name: Install archivebox from deb
run: |
apt install deb_dist/archivebox*.deb
- name: Add some links to test
run: |
mkdir data && cd data
archivebox init
archivebox add 'https://example.com'
archivebox version
archivebox status
# - name: Commit files
# run: |
# cd deb_dist/
# git config --local user.email "action@github.com"
# git config --local user.name "GitHub Action"
# git commit -m "Debian package autobuild" -a
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# repository: ArchiveBox/debian-archivebox
# branch: ${{ github.ref }}
# directory: deb_dist
# TODO: push debian package to launchpad PPA
# - name: Push to launchpad
# run: |
# debsign -k "$PGP_KEY_ID" "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
# dput archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"