Skip to content

Commit 3e4d64c

Browse files
authored
Create pypi_upload.yml
1 parent 4d59a08 commit 3e4d64c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/pypi_upload.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# When a tag is pushed, build packages and upload to PyPI
2+
3+
name: pypi
4+
5+
# Trigger when tags are pushed
6+
on:
7+
push:
8+
tags:
9+
- '*'
10+
11+
workflow_dispatch:
12+
13+
jobs:
14+
build-and-upload:
15+
name: Upload package to PyPI
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: recursive
21+
- name: Install Python 3
22+
uses: actions/setup-python@v1
23+
with:
24+
python-version: 3.8
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
sudo apt-get install -y libopenblas-dev
29+
pip install -r requirements.txt
30+
pip install wheel
31+
python setup.py sdist bdist_wheel
32+
- name: Upload package to PyPI
33+
uses: pypa/gh-action-pypi-publish@release/v1
34+
with:
35+
user: __token__
36+
password: ${{ secrets.PYPI_API_TOKEN }}
37+
verbose: true

0 commit comments

Comments
 (0)