Skip to content

Commit

Permalink
Better deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jettify committed Nov 27, 2020
1 parent 9dfd2fc commit 4357dcf
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,38 +38,22 @@ jobs:
make cov
codecov
pre-deploy:
name: Pre-Deploy
runs-on: ubuntu-latest
needs: test
# Run only on pushing a tag
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Dummy
run: |
echo "Predeploy step"
deploy:
name: Deploy
needs: [pre-deploy]
needs: test
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install twine
run: |
python -m pip install twine wheel
python setup.py sdist bdist_wheel
twine check dist/*
- name: Download dists
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: PyPI upload
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m pip install -U twine wheel
python setup.py sdist bdist_wheel
twine check dist/*
twine upload dist/*

0 comments on commit 4357dcf

Please sign in to comment.