2020-12-06 14:26:44 +00:00
|
|
|
name: Build pip package
|
2020-11-28 10:44:37 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-12-11 19:04:30 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-11-28 10:44:37 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2020-11-28 10:48:45 +00:00
|
|
|
submodules: true
|
2020-11-28 10:44:37 +00:00
|
|
|
fetch-depth: 1
|
|
|
|
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
architecture: x64
|
|
|
|
|
|
|
|
- name: Build Python Package
|
|
|
|
run: |
|
2020-11-28 10:51:17 +00:00
|
|
|
pip3 install --upgrade pip setuptools wheel
|
2020-12-11 16:26:27 +00:00
|
|
|
rm -Rf pip_dist/*.whl
|
2020-11-28 10:44:37 +00:00
|
|
|
python3 setup.py \
|
|
|
|
sdist --dist-dir=./pip_dist \
|
|
|
|
bdist_wheel --dist-dir=./pip_dist \
|
|
|
|
egg_info --egg-base=./pip_dist
|
|
|
|
pip install pip_dist/archivebox-*.whl
|
|
|
|
|
|
|
|
- name: Add some links to test
|
|
|
|
run: |
|
|
|
|
mkdir data && cd data
|
|
|
|
archivebox init
|
|
|
|
archivebox add 'https://example.com'
|
|
|
|
archivebox version
|
|
|
|
archivebox status
|
|
|
|
|
2020-12-11 19:26:37 +00:00
|
|
|
# - name: Commit built package
|
2020-12-11 17:09:40 +00:00
|
|
|
# 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
|
|
|
|
|
2020-12-11 19:26:37 +00:00
|
|
|
# - name: Push build to Github
|
2020-12-11 17:09:40 +00:00
|
|
|
# uses: ad-m/github-push-action@master
|
|
|
|
# with:
|
|
|
|
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# repository: ArchiveBox/pip-archivebox
|
|
|
|
# branch: ${{ github.ref }}
|
|
|
|
# directory: pip_dist
|
|
|
|
|
2020-12-11 19:26:37 +00: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}
|