Skip to content

Commit 4357dcf

Browse files
committed
Better deploy workflow
1 parent 9dfd2fc commit 4357dcf

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

.github/workflows/python-package.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,38 +38,22 @@ jobs:
3838
make cov
3939
codecov
4040
41-
pre-deploy:
42-
name: Pre-Deploy
43-
runs-on: ubuntu-latest
44-
needs: test
45-
# Run only on pushing a tag
46-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
47-
steps:
48-
- name: Dummy
49-
run: |
50-
echo "Predeploy step"
5141
deploy:
5242
name: Deploy
53-
needs: [pre-deploy]
43+
needs: test
44+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
5445
runs-on: ubuntu-latest
5546
steps:
5647
- name: Setup Python 3.8
5748
uses: actions/setup-python@v2
5849
with:
5950
python-version: 3.8
60-
- name: Install twine
61-
run: |
62-
python -m pip install twine wheel
63-
python setup.py sdist bdist_wheel
64-
twine check dist/*
65-
- name: Download dists
66-
uses: actions/download-artifact@v2
67-
with:
68-
name: dist
69-
path: dist
7051
- name: PyPI upload
7152
env:
7253
TWINE_USERNAME: __token__
7354
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
7455
run: |
56+
python -m pip install -U twine wheel
57+
python setup.py sdist bdist_wheel
58+
twine check dist/*
7559
twine upload dist/*

0 commit comments

Comments
 (0)