Skip to content

Commit e16507c

Browse files
committed
Add PyPI release gh actions workflow
1 parent 8b4bf91 commit e16507c

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish to PyPI
2+
on:
3+
release:
4+
types: [released]
5+
workflow_dispatch:
6+
7+
jobs:
8+
publish_to_pypi:
9+
name: Publish to PyPI
10+
runs-on: ubuntu-latest
11+
env:
12+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
13+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
19+
- name: Setup Python 3.9
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: 3.9
23+
24+
- name: Install Required Packages
25+
run: |
26+
pip install -U pip
27+
pip install setuptools wheel twine
28+
29+
- name: Build and Publish
30+
run: |
31+
python setup.py sdist bdist_wheel
32+
twine upload dist/*

0 commit comments

Comments
 (0)