2020-12-06 09:26:44 -05:00
|
|
|
name: Build Debian package
|
2020-11-28 05:44:37 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
|
2020-12-11 12:04:27 -05:00
|
|
|
env:
|
2020-12-11 12:30:26 -05:00
|
|
|
DEB_BUILD_OPTIONS: nocheck
|
2020-11-28 05:44:37 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-12-11 13:18:17 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2020-11-28 05:44:37 -05:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2020-11-28 05:48:45 -05:00
|
|
|
submodules: true
|
2020-11-28 05:44:37 -05:00
|
|
|
fetch-depth: 1
|
|
|
|
|
2020-12-11 11:59:34 -05:00
|
|
|
- name: Install packaging dependencies
|
2020-11-28 05:44:37 -05:00
|
|
|
run: |
|
2021-01-12 05:51:18 -05:00
|
|
|
sudo apt-get update -qq
|
|
|
|
sudo apt-get install -y \
|
2020-12-11 14:05:40 -05:00
|
|
|
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
|
2020-11-28 05:44:37 -05:00
|
|
|
|
2020-12-11 11:59:34 -05:00
|
|
|
- name: Build Debian/Apt sdist_dsc
|
2020-11-28 05:44:37 -05:00
|
|
|
run: |
|
2020-12-11 12:14:11 -05:00
|
|
|
rm -Rf deb_dist/*
|
2020-12-11 12:11:42 -05:00
|
|
|
python3 setup.py --command-packages=stdeb.command sdist_dsc
|
2020-12-11 11:59:34 -05:00
|
|
|
|
|
|
|
- name: Build Debian/Apt bdist_deb
|
|
|
|
run: |
|
2020-12-11 12:11:42 -05:00
|
|
|
python3 setup.py --command-packages=stdeb.command bdist_deb
|
2020-12-11 11:59:34 -05:00
|
|
|
|
|
|
|
- name: Install archivebox from deb
|
|
|
|
run: |
|
2020-12-11 12:41:05 -05:00
|
|
|
cd deb_dist/
|
2021-01-12 05:51:18 -05:00
|
|
|
sudo apt-get install ./archivebox*.deb
|
2020-11-28 05:44:37 -05:00
|
|
|
|
2020-12-11 14:03:17 -05:00
|
|
|
- name: Check ArchiveBox version
|
2020-11-28 05:44:37 -05:00
|
|
|
run: |
|
2020-12-11 14:03:17 -05:00
|
|
|
# must create dir needed for snaps to run as non-root on github actions
|
|
|
|
sudo mkdir -p /run/user/1001 && sudo chmod -R 777 /run/user/1001
|
2020-12-11 13:38:51 -05:00
|
|
|
mkdir "${{ github.workspace }}/data" && cd "${{ github.workspace }}/data"
|
2020-11-28 05:44:37 -05:00
|
|
|
archivebox init
|
2020-12-11 14:03:17 -05:00
|
|
|
archivebox config --set SAVE_READABILITY=False
|
|
|
|
archivebox config --set SAVE_MERCURY=False
|
|
|
|
archivebox config --set SAVE_SINGLEFILE=False
|
2020-12-19 20:11:19 -05:00
|
|
|
archivebox --version
|
2020-12-11 14:03:17 -05:00
|
|
|
|
|
|
|
- name: Add some links to test
|
|
|
|
run: |
|
|
|
|
cd "${{ github.workspace }}/data"
|
|
|
|
archivebox add 'https://example.com'
|
2020-11-28 05:44:37 -05:00
|
|
|
archivebox status
|
|
|
|
|
2020-12-11 14:26:37 -05:00
|
|
|
# - name: Commit built package
|
2020-12-11 12:09:40 -05:00
|
|
|
# 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
|
|
|
|
|
2020-12-11 14:26:37 -05:00
|
|
|
# - name: Push build to Github
|
2020-12-11 12:09:40 -05:00
|
|
|
# uses: ad-m/github-push-action@master
|
|
|
|
# with:
|
|
|
|
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# repository: ArchiveBox/debian-archivebox
|
|
|
|
# branch: ${{ github.ref }}
|
|
|
|
# directory: deb_dist
|
|
|
|
|
2020-12-11 14:26:37 -05:00
|
|
|
# - name: Push build to Launchpad PPA
|
2020-11-28 05:44:37 -05:00
|
|
|
# run: |
|
2020-12-11 11:35:25 -05:00
|
|
|
# debsign -k "$PGP_KEY_ID" "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
|
2020-11-28 05:44:37 -05:00
|
|
|
# dput archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
|