-
Notifications
You must be signed in to change notification settings - Fork 194
58 lines (51 loc) · 1.81 KB
/
release.yml
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
name: release
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: '**/setup.py'
- name: Install dependencies
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip pip-tools build setuptools setuptools_scm wheel
python${{ matrix.python-version }} -m piptools sync --user requirements/ubuntu-latest_py${{ matrix.python-version }}.txt
# Using non-editable install for testing building of MANIFEST files
python${{ matrix.python-version }} -m pip install --no-deps .
- name: Build package and docs
run: |
git config --local user.email "[email protected]"
git config --local user.name "materialsproject"
git fetch --all --prune
git checkout main
python${{ matrix.python-version }} -m build
cd docs_rst
python${{ matrix.python-version }} featurizer_summary.py > featurizer_summary.rst
python${{ matrix.python-version }} dataset_summary.py > dataset_summary.rst
sphinx-apidoc -o . -f ../matminer
make html
cp _static/* ../docs/html/_static
cd ../docs
cp -r html/* .
rm -r html
rm -r doctrees
touch .nojekyll
git add .
git commit -a -m "update docs"
git push
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}