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,24 @@ 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
+ echo "${{ 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
+ }}"
24
31
steps :
25
32
- uses : actions/checkout@v4
26
- - uses : dorny/paths-filter@v2
33
+ with :
34
+ persist-credentials : false
35
+ - uses : dorny/paths-filter@v3
27
36
id : filter
28
37
with :
29
38
filters : |
39
48
make_sdist :
40
49
name : Make SDist
41
50
needs : check_changes
42
- # Run if it's a release, auto-release branch, or if relevant files changed on main
51
+ # Run if it's a release or if relevant files changed on main
43
52
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')
53
+ needs.check_changes.outputs.should_run == 'true'
48
54
runs-on : ubuntu-latest
49
55
permissions :
50
56
# write id-token and attestations are required to attest build provenance
75
81
run_checks :
76
82
name : Build & inspect our package.
77
83
needs : check_changes
78
- # Run if it's a release, auto-release branch, or if relevant files changed on main
84
+ # Run if it's a release or if relevant files changed on main
79
85
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')
86
+ needs.check_changes.outputs.should_run == 'true'
84
87
# Note: the resulting builds are not actually published.
85
88
# This is purely for additional testing and diagnostic purposes.
86
89
runs-on : ubuntu-latest
95
98
build_wheels :
96
99
name : Build wheels for ${{ matrix.platform }}
97
100
needs : check_changes
98
- # Run if it's a release, auto-release branch, or if relevant files changed on main
101
+ # Run if it's a release or if relevant files changed on main
99
102
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')
103
+ needs.check_changes.outputs.should_run == 'true'
104
104
runs-on : ${{ matrix.platform }}
105
105
permissions :
106
106
# write id-token and attestations are required to attest build provenance
@@ -136,12 +136,9 @@ jobs:
136
136
build_universal_wheel :
137
137
name : Build universal wheel for Pyodide
138
138
needs : check_changes
139
- # Run if it's a release, auto-release branch, or if relevant files changed on main
139
+ # Run if it's a release or if relevant files changed on main
140
140
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')
141
+ needs.check_changes.outputs.should_run == 'true'
145
142
runs-on : ubuntu-latest
146
143
permissions :
147
144
# write id-token and attestations are required to attest build provenance
@@ -181,10 +178,7 @@ jobs:
181
178
name : Check dist
182
179
needs : [check_changes, make_sdist, build_wheels]
183
180
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')
181
+ needs.check_changes.outputs.should_run == 'true'
188
182
runs-on : ubuntu-22.04
189
183
steps :
190
184
- uses : actions/download-artifact@v4
0 commit comments