Skip to content

Commit

Permalink
Trigger deploy step upon release creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dokempf committed Nov 24, 2020
1 parent 07d0038 commit 92d6f74
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published

env:
BUILD_TYPE: Release
Expand Down Expand Up @@ -48,8 +51,8 @@ jobs:
needs: [build-and-test]
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
# Build wheels on every tag starting with 'v' (saves some build time)
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# Build wheels only when Github releases are created
if: github.event_name == 'release' && github.event.action == 'published'

strategy:
matrix:
Expand Down Expand Up @@ -88,8 +91,8 @@ jobs:
upload_pypi:
needs: [build-wheels]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# upload to PyPI only when Github releases are created
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v2
with:
Expand Down

0 comments on commit 92d6f74

Please sign in to comment.