Skip to content

Commit 22eaf1a

Browse files
authored
Setup autodeployment (#758)
1 parent aee035e commit 22eaf1a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,29 @@ jobs:
4141
make cov-ci
4242
python setup.py check -rms
4343
codecov
44+
45+
deploy:
46+
name: Deploy
47+
runs-on: ubuntu-latest
48+
needs: test
49+
# Run only on pushing a tag
50+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v2
54+
- name: Setup Python 3.8
55+
uses: actions/setup-python@v2
56+
with:
57+
python-version: 3.8
58+
- name: Install dependencies
59+
run:
60+
python -m pip install -U pip wheel twine
61+
- name: Make dists
62+
run:
63+
python setup.py sdist bdist_wheel
64+
- name: PyPI upload
65+
env:
66+
TWINE_USERNAME: __token__
67+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
68+
run: |
69+
twine upload dist/*

0 commit comments

Comments
 (0)