Skip to content

Commit 629bbbf

Browse files
fix ci.yml
1 parent 9b695eb commit 629bbbf

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Ci
33
on: [push]
44

55
jobs:
6-
testing:
6+
test:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
@@ -24,21 +24,23 @@ jobs:
2424
2525
2626
publish:
27+
needs: test
28+
if: github.ref == 'refs/heads/master'
2729
runs-on: ubuntu-latest
28-
steps:
29-
- uses: actions/checkout@v2
30-
- name: Set up Python
31-
uses: actions/setup-python@v1
32-
with:
33-
python-version: '3.x'
34-
- name: Install dependencies
35-
run: |
36-
python -m pip install --upgrade pip nox
37-
pip install twine
38-
- name: Build and publish
39-
env:
40-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
41-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
42-
run: |
43-
nox -s build
44-
twine upload dist/* --skip-existing
30+
steps:
31+
- uses: actions/checkout@v2
32+
- name: Set up Python
33+
uses: actions/setup-python@v1
34+
with:
35+
python-version: '3.x'
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip nox
39+
pip install twine
40+
- name: Build and publish
41+
env:
42+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
43+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
44+
run: |
45+
nox -s build
46+
twine upload dist/* --skip-existing

0 commit comments

Comments
 (0)