debian.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. name: Build Debian package
  2. on:
  3. workflow_dispatch:
  4. push:
  5. env:
  6. DEB_BUILD_OPTIONS: nocheck
  7. jobs:
  8. build:
  9. runs-on: ubuntu-20.04
  10. steps:
  11. - uses: actions/checkout@v2
  12. with:
  13. submodules: true
  14. fetch-depth: 1
  15. - name: Install packaging dependencies
  16. run: |
  17. sudo apt-get update -qq
  18. sudo apt-get install -y \
  19. python3 python3-dev python3-pip python3-venv python3-all \
  20. dh-python debhelper devscripts dput software-properties-common \
  21. python3-distutils python3-setuptools python3-wheel python3-stdeb
  22. - name: Build Debian/Apt sdist_dsc
  23. run: |
  24. rm -Rf deb_dist/*
  25. python3 setup.py --command-packages=stdeb.command sdist_dsc
  26. - name: Build Debian/Apt bdist_deb
  27. run: |
  28. python3 setup.py --command-packages=stdeb.command bdist_deb
  29. - name: Install archivebox from deb
  30. run: |
  31. cd deb_dist/
  32. sudo apt-get install ./archivebox*.deb
  33. - name: Check ArchiveBox version
  34. run: |
  35. # must create dir needed for snaps to run as non-root on github actions
  36. sudo mkdir -p /run/user/1001 && sudo chmod -R 777 /run/user/1001
  37. mkdir "${{ github.workspace }}/data" && cd "${{ github.workspace }}/data"
  38. archivebox init
  39. archivebox config --set SAVE_READABILITY=False
  40. archivebox config --set SAVE_MERCURY=False
  41. archivebox config --set SAVE_SINGLEFILE=False
  42. archivebox --version
  43. - name: Add some links to test
  44. run: |
  45. cd "${{ github.workspace }}/data"
  46. archivebox add 'https://example.com'
  47. archivebox status
  48. # - name: Commit built package
  49. # run: |
  50. # cd deb_dist/
  51. # git config --local user.email "[email protected]"
  52. # git config --local user.name "GitHub Action"
  53. # git commit -m "Debian package autobuild" -a
  54. # - name: Push build to Github
  55. # uses: ad-m/github-push-action@master
  56. # with:
  57. # github_token: ${{ secrets.GITHUB_TOKEN }}
  58. # repository: ArchiveBox/debian-archivebox
  59. # branch: ${{ github.ref }}
  60. # directory: deb_dist
  61. # - name: Push build to Launchpad PPA
  62. # run: |
  63. # debsign -k "$PGP_KEY_ID" "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
  64. # dput archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"