Skip to content

Commit 1e888ba

Browse files
committed
Improve workflow for publishing on PyPI
We want to publish wheels for both Python 2 and 3
1 parent 0ba650b commit 1e888ba

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/publish_on_pypi.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13-
python: [2.7, 3.9]
13+
python: [3.9, 2.7]
1414

1515
steps:
1616
- uses: actions/checkout@v2
@@ -20,13 +20,16 @@ jobs:
2020
with:
2121
python-version: ${{ matrix.python }}
2222

23-
- name: Build wheel and source tarball
23+
- name: Build source tarball
24+
if: matrix.python == 3.9
25+
run: python setup.py sdist
26+
27+
- name: Build wheel
2428
run: |
2529
pip install wheel
26-
python setup.py sdist bdist_wheel
30+
python setup.py bdist_wheel
2731
28-
- name: Publish a Python distribution to PyPI
29-
if: matrix.python == 3.9
32+
- name: Publish distribution to PyPI
3033
uses: pypa/gh-action-pypi-publish@release/v1
3134
with:
3235
user: __token__

0 commit comments

Comments
 (0)