Skip to content

Commit

Permalink
add deploy job to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengp0 committed Dec 17, 2020
1 parent 3bcff7b commit 00bb3e9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,24 @@ 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
run: |
python -m pip install build --upgrade pip
python -m build --sdist --wheel --outdir dist/ .
- name: Publish package distribution to PyPI
uses: pypa/gh-action-pypi-publish@main
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 00bb3e9

Please sign in to comment.