Skip to content

Commit

Permalink
build: Run build workflow on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarnell committed Jun 10, 2022
1 parent ae4fd64 commit 4470d69
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- "branch[0-9]*"
# Also run on certain other branches for testing.
- "build-workflow*"
tags:
- "v*"

env:
python-version: '3.9'
Expand Down Expand Up @@ -63,6 +65,7 @@ jobs:
path: ./wheelhouse/*.whl

upload_pypi_test:
name: Upload to PyPI (test)
needs: [build_wheels, build_sdist]
runs-on: ubuntu-20.04
if: github.event_name == 'push' && startsWith(github.ref_name, 'build-workflow')
Expand All @@ -77,8 +80,10 @@ jobs:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true

upload_pypi:
name: Upload to PyPI (prod)
needs: [build_wheels, build_sdist]
runs-on: ubuntu-20.04
if: github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref_name, 'v')
Expand Down

0 comments on commit 4470d69

Please sign in to comment.