File tree Expand file tree Collapse file tree 1 file changed +33
-2
lines changed Expand file tree Collapse file tree 1 file changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,40 @@ name: Build Wheels
33on :
44 push :
55 branches :
6- - package-fix
6+ - main
77 tags :
8- - ' v*'
8+ - " quaddtype-v*"
9+ paths :
10+ - ' quaddtype/**'
911 pull_request :
12+ paths :
13+ - ' quaddtype/**'
14+ workflow_dispatch :
1015
1116jobs :
17+ check_build_needed :
18+ runs-on : ubuntu-latest
19+ outputs :
20+ build_needed : ${{ steps.check.outputs.build_needed }}
21+ steps :
22+ - uses : actions/checkout@v3
23+ with :
24+ fetch-depth : 2
25+ - id : check
26+ run : |
27+ if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/tags/quaddtype-v"* ]]; then
28+ echo "build_needed=true" >> $GITHUB_OUTPUT
29+ elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
30+ echo "build_needed=true" >> $GITHUB_OUTPUT
31+ elif git log -1 --pretty=%B | grep -q "\[wheel build\]"; then
32+ echo "build_needed=true" >> $GITHUB_OUTPUT
33+ else
34+ echo "build_needed=false" >> $GITHUB_OUTPUT
35+ fi
36+
1237 build_wheels_linux :
38+ needs : check_build_needed
39+ if : needs.check_build_needed.outputs.build_needed == 'true'
1340 name : Build wheels on Linux
1441 runs-on : ubuntu-latest
1542 steps :
5582 name : wheels-linux
5683
5784 build_wheels_macos :
85+ needs : check_build_needed
86+ if : needs.check_build_needed.outputs.build_needed == 'true'
5887 name : Build wheels on ${{ matrix.os }}
5988 runs-on : ${{ matrix.os }}
6089 strategy :
@@ -114,6 +143,8 @@ jobs:
114143 name : wheels-${{ matrix.os }}
115144
116145 build_wheels_windows :
146+ needs : check_build_needed
147+ if : needs.check_build_needed.outputs.build_needed == 'true'
117148 name : Build wheels on Windows
118149 runs-on : windows-latest
119150 strategy :
You can’t perform that action at this time.
0 commit comments