-
Notifications
You must be signed in to change notification settings - Fork 30
69 lines (62 loc) · 2.01 KB
/
release.yml
File metadata and controls
69 lines (62 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Publish Python 🐍 distributions 📦 to PyPI
on:
release:
types: [published]
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Python 3.8
uses: actions/setup-python@v2.1.4
with:
python-version: 3.8
- name: Install python dependencies
env:
PYTHONWARNINGS: ignore:DEPRECATION::pip._internal.cli.base_command
run: |
python -m pip install --upgrade pip
pip install numpy==1.19
- name: Install c++ dependencies (ubuntu)
run: |
sudo apt-get -y install libsparsehash-dev doxygen
- name: Set gcc envvars
run: |
echo ::set-env name=CC::gcc-8
echo ::set-env name=CXX::g++-8
- name: Build sdist
run: python setup.py sdist
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
skip_existing: true
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Install from test and test running
run: |
pip install --extra-index-url https://test.pypi.org/simple libpy
mkdir tmp && cd tmp && python -c 'import libpy;print(libpy.__version__)'
pip uninstall -y libpy
cd ..
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
skip_existing: true
password: ${{ secrets.pypi_password }}
- name: Install and test running
run: |
pip install libpy
cd tmp && python -c 'import libpy;print(libpy.__version__)'
cd ..
- name: Build the docs
run: |
pip install sphinx sphinx_rtd_theme breathe ipython
make docs
- name: Deploy the docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html