Skip to content

Commit

Permalink
combine build and deploy into one job
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengp0 committed Dec 17, 2020
1 parent 00bb3e9 commit 14c2375
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,14 @@ jobs:
run: python -m pip install .[dev] --upgrade pip
- name: Test with pytest
run: pytest

deploy:

if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest

steps:
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Build package distribution
if: startsWith(github.ref, 'refs/tags')
run: |
python -m pip install build --upgrade pip
python -m pip install build
python -m build --sdist --wheel --outdir dist/ .
- name: Publish package distribution to PyPI
uses: pypa/gh-action-pypi-publish@main
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
skip_existing: true
user: __token__
Expand Down

0 comments on commit 14c2375

Please sign in to comment.