Skip to content

Commit de04c97

Browse files
committed
add pypi publish wokflow
1 parent 2176655 commit de04c97

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/publish_pypi.yml

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

0 commit comments

Comments
 (0)