github-actions: restrict build jobs to only run if a release is created

This commit is contained in:
Martin Bubel 2024-01-14 23:44:03 +01:00
parent 15382a4446
commit b39ade5164

View file

@ -99,6 +99,7 @@ jobs:
pytest GPy/testing pytest GPy/testing
build-windows: build-windows:
if: github.event_name == 'release'
strategy: strategy:
matrix: matrix:
os: [windows-latest] os: [windows-latest]
@ -131,6 +132,7 @@ jobs:
path: dist path: dist
build-macos: build-macos:
if: github.event_name == 'release'
strategy: strategy:
matrix: matrix:
os: [macos-latest] os: [macos-latest]
@ -162,6 +164,7 @@ jobs:
path: dist/* path: dist/*
build-linux: build-linux:
if: github.event_name == 'release'
strategy: strategy:
matrix: matrix:
python: ['cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312'] python: ['cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312']