Skip to content

Commit 93c8010

Browse files
authored
✨ NEW: Added publish action in CI #21
1 parent f1f6793 commit 93c8010

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,25 @@ jobs:
4444
flags: pytests
4545
file: ./coverage.xml
4646
fail_ci_if_error: true
47+
48+
publish:
49+
name: Publish to PyPi
50+
needs: [pre-commit, tests]
51+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout source
55+
uses: actions/checkout@v2
56+
- name: Set up Python 3.7
57+
uses: actions/setup-python@v1
58+
with:
59+
python-version: 3.7
60+
- name: Build package
61+
run: |
62+
pip install wheel
63+
python setup.py sdist bdist_wheel
64+
- name: Publish
65+
uses: pypa/[email protected]
66+
with:
67+
user: __token__
68+
password: ${{ secrets.PYPI_KEY }}

0 commit comments

Comments
 (0)