1
0
Fork 0
mirror of synced 2024-06-15 08:54:32 +12:00
ArchiveBox/.github/workflows/debian.yml

78 lines
2.4 KiB
YAML
Raw Normal View History

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