Skip to content

Commit 1a7a6d8

Browse files
committed
Add GitHub workflow to publish to PyPI.
1 parent 921d86b commit 1a7a6d8

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install setuptools wheel twine
23+
24+
- name: Build and publish
25+
env:
26+
TWINE_USERNAME: __token__
27+
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
28+
run: |
29+
python setup.py sdist bdist_wheel
30+
twine upload dist/*

0 commit comments

Comments
 (0)