pip.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: Build Pip package
  2. on:
  3. workflow_dispatch:
  4. push:
  5. jobs:
  6. build:
  7. runs-on: ubuntu-22.04
  8. permissions:
  9. id-token: write
  10. steps:
  11. - uses: actions/checkout@v4
  12. with:
  13. submodules: true
  14. fetch-depth: 1
  15. - name: Set up Python
  16. uses: actions/setup-python@v5
  17. with:
  18. python-version: '3.11'
  19. architecture: x64
  20. - uses: awalsh128/cache-apt-pkgs-action@latest
  21. with:
  22. packages: ripgrep build-essential python3-dev python3-setuptools libssl-dev libldap2-dev libsasl2-dev zlib1g-dev libatomic1 gnupg2 curl wget python3-ldap python3-msgpack python3-mutagen python3-regex python3-pycryptodome procps
  23. version: 1.0
  24. - uses: pdm-project/setup-pdm@v3
  25. with:
  26. python-version: '3.11'
  27. cache: true
  28. - name: Install dependencies
  29. run: pdm install --fail-fast --no-lock --group :all --no-self
  30. - name: Build package
  31. run: |
  32. pdm build
  33. - name: Install from build
  34. run: pip install ./dist/archivebox-*.whl
  35. - name: Add some links to test
  36. run: |
  37. mkdir data && cd data
  38. archivebox init
  39. archivebox add 'https://example.com'
  40. archivebox version
  41. archivebox status
  42. #- name: Publish package distributions to PyPI
  43. # run: pdm publish --no-build
  44. # - name: Push build to PyPI
  45. # run: |
  46. # cd pip_dist/
  47. # python3 -m twine upload --repository testpypi pip_dist/*.{whl,tar.gz}
  48. # python3 -m twine upload --repository pypi pip_dist/*.{whl,tar.gz}
  49. # - name: Commit built package
  50. # run: |
  51. # cd pip_dist/
  52. # git config --local user.email "[email protected]"
  53. # git config --local user.name "GitHub Action"
  54. # git commit -m "Pip package autobuild" -a
  55. # - name: Push build to Github
  56. # uses: ad-m/github-push-action@master
  57. # with:
  58. # github_token: ${{ secrets.GITHUB_TOKEN }}
  59. # repository: ArchiveBox/pip-archivebox
  60. # branch: ${{ github.ref }}
  61. # directory: pip_dist