Only run jobs when relevent

hotfix/mipmap-alpha-fix
Andrew Cassidy 3 years ago
parent 4a8e416f1f
commit 3ebf07ae74

@ -3,11 +3,7 @@
name: Python Package name: Python Package
on: on: [push, pull_request]
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs: jobs:
test: test:
@ -61,7 +57,12 @@ jobs:
build: build:
needs: test needs: test
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags'))
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env:
MACOSX_DEPLOYMENT_TARGET: 10_15
strategy: strategy:
matrix: matrix:
python-version: [ 3.7, 3.8, 3.9 ] python-version: [ 3.7, 3.8, 3.9 ]
@ -106,6 +107,7 @@ jobs:
publish: publish:
needs: build needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

Loading…
Cancel
Save