3
3
push :
4
4
branches :
5
5
- main
6
- - auto-release
7
6
pull_request :
8
7
branches : [main]
9
8
release :
@@ -16,14 +15,28 @@ concurrency:
16
15
group : ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
17
16
cancel-in-progress : true
18
17
18
+ permissions : {}
19
+
19
20
jobs :
20
21
check_changes :
21
22
runs-on : ubuntu-latest
22
23
outputs :
23
- should_run : ${{ steps.filter.outputs.any_changed }}
24
+ should_run : |
25
+ if [[ "${{ github.event_name == 'release' ||
26
+ (
27
+ github.ref == 'refs/heads/main' ||
28
+ github.event_name == 'pull_request'
29
+ ) && steps.filter.outputs.any_changed == 'true'
30
+ }}" == "true" ]]; then
31
+ echo "true"
32
+ else
33
+ echo "false"
34
+ fi
24
35
steps :
25
36
- uses : actions/checkout@v4
26
- - uses : dorny/paths-filter@v2
37
+ with :
38
+ persist-credentials : false
39
+ - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
27
40
id : filter
28
41
with :
29
42
filters : |
39
52
make_sdist :
40
53
name : Make SDist
41
54
needs : check_changes
42
- # Run if it's a release, auto-release branch, or if relevant files changed on main
55
+ # Run if it's a release or if relevant files changed on main
43
56
if : |
44
- github.event_name == 'release' ||
45
- github.ref == 'refs/heads/auto-release' ||
46
- (github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') ||
47
- (github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true')
57
+ needs.check_changes.outputs.should_run == 'true'
48
58
runs-on : ubuntu-latest
49
59
permissions :
50
60
# write id-token and attestations are required to attest build provenance
75
85
run_checks :
76
86
name : Build & inspect our package.
77
87
needs : check_changes
78
- # Run if it's a release, auto-release branch, or if relevant files changed on main
88
+ # Run if it's a release or if relevant files changed on main
79
89
if : |
80
- github.event_name == 'release' ||
81
- github.ref == 'refs/heads/auto-release' ||
82
- (github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') ||
83
- (github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true')
90
+ needs.check_changes.outputs.should_run == 'true'
84
91
# Note: the resulting builds are not actually published.
85
92
# This is purely for additional testing and diagnostic purposes.
86
93
runs-on : ubuntu-latest
@@ -95,12 +102,9 @@ jobs:
95
102
build_wheels :
96
103
name : Build wheels for ${{ matrix.platform }}
97
104
needs : check_changes
98
- # Run if it's a release, auto-release branch, or if relevant files changed on main
105
+ # Run if it's a release or if relevant files changed on main
99
106
if : |
100
- github.event_name == 'release' ||
101
- github.ref == 'refs/heads/auto-release' ||
102
- (github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') ||
103
- (github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true')
107
+ needs.check_changes.outputs.should_run == 'true'
104
108
runs-on : ${{ matrix.platform }}
105
109
permissions :
106
110
# write id-token and attestations are required to attest build provenance
@@ -136,12 +140,9 @@ jobs:
136
140
build_universal_wheel :
137
141
name : Build universal wheel for Pyodide
138
142
needs : check_changes
139
- # Run if it's a release, auto-release branch, or if relevant files changed on main
143
+ # Run if it's a release or if relevant files changed on main
140
144
if : |
141
- github.event_name == 'release' ||
142
- github.ref == 'refs/heads/auto-release' ||
143
- (github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') ||
144
- (github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true')
145
+ needs.check_changes.outputs.should_run == 'true'
145
146
runs-on : ubuntu-latest
146
147
permissions :
147
148
# write id-token and attestations are required to attest build provenance
@@ -180,11 +181,6 @@ jobs:
180
181
check_dist :
181
182
name : Check dist
182
183
needs : [check_changes, make_sdist, build_wheels]
183
- if : |
184
- github.event_name == 'release' ||
185
- github.ref == 'refs/heads/auto-release' ||
186
- (github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') ||
187
- (github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true')
188
184
runs-on : ubuntu-22.04
189
185
steps :
190
186
- uses : actions/download-artifact@v4
0 commit comments