Skip to content

Commit aeb1107

Browse files
committed
publish to pypi only if PEP8 compliance passes
1 parent 7e1f181 commit aeb1107

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

.github/workflows/actions.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: github-actions
22
on: [push]
33
jobs:
44
check-pep8-compliance:
5-
runs-on: ubuntu-latest
5+
runs-on: ubuntu-20.04
66
steps:
77
- uses: actions/checkout@v2
88
- name: Set up Python 3.7
@@ -11,18 +11,23 @@ jobs:
1111
python-version: 3.7
1212
- name: Install dependencies
1313
run: |
14-
python -m pip install build --user --upgrade pip
14+
python -m pip install --user --upgrade pip
1515
pip install pycodestyle
1616
- name: Validate PEP8 compliance
1717
run: pycodestyle .
18-
- name: Build a binary wheel and a source tarball
19-
run: >-
20-
python -m
21-
build
22-
--sdist
23-
--wheel
24-
--outdir dist/
25-
.
18+
19+
publish-to-pypi:
20+
need: [check-pep8-compliance]
21+
runs-on: ubuntu-20.04
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Set up Python 3.7
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.7
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install build --user --upgrade pip
2631
- name: Publish 📦 to PyPI
2732
if: startsWith(github.ref, 'refs/tags')
2833
uses: pypa/gh-action-pypi-publish@master

0 commit comments

Comments
 (0)