Skip to content

Commit 551f101

Browse files
committed
Update tests.yml
1 parent 0f3031a commit 551f101

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
name: Python package
55

6-
on:
7-
push:
8-
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
6+
on: [push, pull_request]
7+
# push:
8+
# branches: [ master ]
9+
# pull_request:
10+
# branches: [ master ]
1111

1212
jobs:
1313
build:
@@ -34,3 +34,15 @@ jobs:
3434
run: |
3535
pip install pytest
3636
pytest tests/
37+
38+
- name: Build package
39+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
40+
run: |
41+
pip install wheel
42+
python setup.py sdist bdist_wheel
43+
- name: Publish to PyPi
44+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
45+
uses: pypa/[email protected]
46+
with:
47+
user: __token__
48+
password: ${{ secrets.PYPI_KEY }}

0 commit comments

Comments
 (0)