Skip to content

Commit fec16a1

Browse files
committed
Push to PyPi when a new releast is created
1 parent 48aac77 commit fec16a1

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/push-to-pypi.yml

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

0 commit comments

Comments
 (0)