1
0
Fork 0
mirror of synced 2024-06-02 10:34:43 +12:00
ArchiveBox/.github/workflows/pip.yml

79 lines
2.1 KiB
YAML
Raw Normal View History

2021-01-21 13:13:53 +13:00
name: Build Pip package
2020-11-28 23:44:37 +13:00
on:
workflow_dispatch:
push:
jobs:
build:
runs-on: ubuntu-22.04
2020-11-28 23:44:37 +13:00
2023-11-04 15:12:19 +13:00
permissions:
id-token: write
2020-11-28 23:44:37 +13:00
steps:
2023-11-04 15:12:19 +13:00
- uses: actions/checkout@v4
2020-11-28 23:44:37 +13:00
with:
2020-11-28 23:48:45 +13:00
submodules: true
2020-11-28 23:44:37 +13:00
fetch-depth: 1
- name: Set up Python
2024-01-05 16:02:46 +13:00
uses: actions/setup-python@v5
2020-11-28 23:44:37 +13:00
with:
2024-01-05 16:02:46 +13:00
python-version: '3.11'
2020-11-28 23:44:37 +13:00
architecture: x64
2024-01-05 15:51:59 +13:00
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
2024-01-05 16:02:46 +13:00
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
2024-01-05 15:51:59 +13:00
version: 1.0
2023-11-04 15:12:19 +13:00
- uses: pdm-project/setup-pdm@v3
2024-01-05 16:20:03 +13:00
with:
python-version: '3.11'
cache: true
2023-11-04 15:12:19 +13:00
- name: Install dependencies
2024-01-13 02:25:18 +13:00
run: pdm install --fail-fast --no-lock --dev --group=':all' --no-self
2023-11-04 15:12:19 +13:00
- name: Build package
2020-11-28 23:44:37 +13:00
run: |
2023-11-04 15:12:19 +13:00
pdm build
- name: Install from build
run: pip install ./dist/archivebox-*.whl
2020-11-28 23:44:37 +13:00
- name: Add some links to test
run: |
mkdir data && cd data
archivebox init
archivebox add 'https://example.com'
archivebox version
archivebox status
2024-01-05 16:23:26 +13:00
#- name: Publish package distributions to PyPI
# run: pdm publish --no-build
2023-11-04 15:12:19 +13:00
2021-04-13 19:59:44 +12:00
# - name: Push build to PyPI
# run: |
# cd pip_dist/
# python3 -m twine upload --repository testpypi pip_dist/*.{whl,tar.gz}
# python3 -m twine upload --repository pypi pip_dist/*.{whl,tar.gz}
# - name: Commit built package
# run: |
# cd pip_dist/
# git config --local user.email "action@github.com"
# git config --local user.name "GitHub Action"
# git commit -m "Pip package autobuild" -a
# - name: Push build to Github
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# repository: ArchiveBox/pip-archivebox
# branch: ${{ github.ref }}
# directory: pip_dist