Skip to content

Commit d516142

Browse files
authoredFeb 20, 2022
Create pypi.yml
1 parent a7f0373 commit d516142

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
 

‎.github/workflows/pypi.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PyPI publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-n-publish:
9+
name: Build python package
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Setup
16+
run: pip3 install setuptools wheel twine
17+
18+
- name: Build
19+
env:
20+
PYPI_VERSION: ${{ github.ref }}
21+
run: python3 setup.py bdist_wheel sdist
22+
23+
- name: Upload
24+
env:
25+
TWINE_USERNAME: __token__
26+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
27+
run: twine upload dist/*
28+
29+
- name: Clean up
30+
run: rm -rf dist build module.egg-info

0 commit comments

Comments
 (0)
Please sign in to comment.