Skip to content

Commit 80a0113

Browse files
committed
publish workflow
1 parent 26b83db commit 80a0113

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: pypi-publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
publish:
10+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.9
20+
21+
- name: "Installs and upgrades pip, dependencies and the package"
22+
run: |
23+
python3 -m pip install --upgrade pip
24+
python3 -m pip install setuptools wheel twine
25+
pip install -r requirements.txt
26+
python3 setup.py install
27+
28+
- name: Build and publish package
29+
run: |
30+
python3 setup.py sdist bdist_wheel
31+
python3 -m twine upload dist/*
32+
env:
33+
TWINE_USERNAME: __token__
34+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
35+
TWINE_REPOSITORY: pypi

0 commit comments

Comments
 (0)