Skip to content

Commit 826ca4e

Browse files
committed
Apply suggestions from code reviews
1 parent 047065f commit 826ca4e

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/pypi.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ on:
33
push:
44
branches:
55
- main
6-
- auto-release
76
pull_request:
87
branches: [main]
98
release:
@@ -16,11 +15,19 @@ concurrency:
1615
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
1716
cancel-in-progress: true
1817

18+
permissions: {}
19+
1920
jobs:
2021
check_changes:
2122
runs-on: ubuntu-latest
2223
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+
}}"
2431
steps:
2532
- uses: actions/checkout@v4
2633
- uses: dorny/paths-filter@v2
@@ -39,10 +46,9 @@ jobs:
3946
make_sdist:
4047
name: Make SDist
4148
needs: check_changes
42-
# Run if it's a release, auto-release branch, or if relevant files changed on main
49+
# Run if it's a release or if relevant files changed on main
4350
if: |
4451
github.event_name == 'release' ||
45-
github.ref == 'refs/heads/auto-release' ||
4652
(github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') ||
4753
(github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true')
4854
runs-on: ubuntu-latest
@@ -75,10 +81,9 @@ jobs:
7581
run_checks:
7682
name: Build & inspect our package.
7783
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
7985
if: |
8086
github.event_name == 'release' ||
81-
github.ref == 'refs/heads/auto-release' ||
8287
(github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') ||
8388
(github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true')
8489
# Note: the resulting builds are not actually published.
@@ -95,10 +100,9 @@ jobs:
95100
build_wheels:
96101
name: Build wheels for ${{ matrix.platform }}
97102
needs: check_changes
98-
# Run if it's a release, auto-release branch, or if relevant files changed on main
103+
# Run if it's a release or if relevant files changed on main
99104
if: |
100105
github.event_name == 'release' ||
101-
github.ref == 'refs/heads/auto-release' ||
102106
(github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') ||
103107
(github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true')
104108
runs-on: ${{ matrix.platform }}
@@ -136,10 +140,9 @@ jobs:
136140
build_universal_wheel:
137141
name: Build universal wheel for Pyodide
138142
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
140144
if: |
141145
github.event_name == 'release' ||
142-
github.ref == 'refs/heads/auto-release' ||
143146
(github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') ||
144147
(github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true')
145148
runs-on: ubuntu-latest
@@ -182,7 +185,6 @@ jobs:
182185
needs: [check_changes, make_sdist, build_wheels]
183186
if: |
184187
github.event_name == 'release' ||
185-
github.ref == 'refs/heads/auto-release' ||
186188
(github.ref == 'refs/heads/main' && needs.check_changes.outputs.should_run == 'true') ||
187189
(github.event_name == 'pull_request' && needs.check_changes.outputs.should_run == 'true')
188190
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)