Skip to content

Commit bed259a

Browse files
authored
Update publish-to-pypi.yml (#38)
1 parent f0b77e6 commit bed259a

File tree

1 file changed

+25
-30
lines changed

1 file changed

+25
-30
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,29 @@ on:
99
- main
1010

1111
jobs:
12-
build-n-publish:
13-
name: Build and publish Python 🐍 distributions 📦 to PyPI
14-
runs-on: ubuntu-18.04
15-
steps:
16-
- uses: actions/checkout@master
17-
- name: Set up Python 3.7
18-
uses: actions/setup-python@v1
19-
with:
20-
python-version: 3.7
21-
- name: Install package dependencies
22-
run: >-
23-
python -m
24-
pip install
25-
.[dev]
26-
- name: Test with pytest
27-
run: python -m pytest
28-
- name: Build a binary wheel and a source tarball
29-
run: >-
30-
python
31-
setup.py
32-
sdist
33-
bdist_wheel
34-
- name: Publish distribution 📦 to PyPI
35-
if: startsWith(github.ref, 'refs/tags')
36-
uses: pypa/gh-action-pypi-publish@master
37-
with:
38-
user: __token__
39-
password: ${{ secrets.pypi_password }}
40-
41-
12+
build-n-publish:
13+
name: Build and publish Python 🐍 distributions 📦 to PyPI
14+
runs-on: ubuntu-18.04
15+
steps:
16+
- uses: actions/checkout@master
17+
18+
- name: Set up Python 3.7
19+
uses: actions/setup-python@v1
20+
with:
21+
python-version: 3.7
4222

23+
- name: Install package dependencies
24+
run: python -m pip install .[dev]
25+
26+
- name: Test with pytest
27+
run: python -m pytest
28+
29+
- name: Build a binary wheel and a source tarball
30+
run: python setup.py sdist bdist_wheel
31+
32+
- name: Publish distribution 📦 to PyPI
33+
if: startsWith(github.ref, 'refs/tags')
34+
uses: pypa/gh-action-pypi-publish@master
35+
with:
36+
user: __token__
37+
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)