Skip to content

Commit 5763aa5

Browse files
authored
fix skipping (#162)
1 parent aedffb1 commit 5763aa5

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

.github/workflows/python-release.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ jobs:
5555
needs: check_pr_push
5656
if: |
5757
always() &&
58-
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' || needs.check_pr_push.result == 'skipped') &&
59-
(github.event_name != 'pull_request' || github.event.pull_request.merged == true || github.event.action == 'opened' || github.event.action == 'synchronize')
58+
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' ||
59+
needs.check_pr_push.result == 'skipped' && contains(fromJSON('["master", "dev", "development"]'), github.ref_name))
6060
runs-on: ${{ matrix.os }}
6161
strategy:
6262
fail-fast: false
@@ -134,11 +134,8 @@ jobs:
134134
path: python/pecos-rslib/dist/*.whl
135135

136136
test_abi3_wheels:
137-
needs: [check_pr_push, build_wheels_pecos_rslib]
138-
if: |
139-
needs.build_wheels_pecos_rslib.result == 'success' &&
140-
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' || needs.check_pr_push.result == 'skipped') &&
141-
(github.event_name != 'pull_request' || github.event.pull_request.merged == true || github.event.action == 'opened' || github.event.action == 'synchronize')
137+
needs: build_wheels_pecos_rslib
138+
if: needs.build_wheels_pecos_rslib.result == 'success'
142139
runs-on: ${{ matrix.platform.runner }}
143140
strategy:
144141
fail-fast: false
@@ -182,11 +179,8 @@ jobs:
182179
python -c 'import sys; print(f"Python version: {sys.version}")'
183180
184181
build_sdist_quantum_pecos:
185-
needs: [check_pr_push, build_wheels_pecos_rslib]
186-
if: |
187-
needs.build_wheels_pecos_rslib.result == 'success' &&
188-
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' || needs.check_pr_push.result == 'skipped') &&
189-
(github.event_name != 'pull_request' || github.event.pull_request.merged == true || github.event.action == 'opened' || github.event.action == 'synchronize')
182+
needs: build_wheels_pecos_rslib
183+
if: needs.build_wheels_pecos_rslib.result == 'success'
190184
runs-on: ubuntu-latest
191185
steps:
192186
- uses: actions/checkout@v4
@@ -235,11 +229,8 @@ jobs:
235229
path: python/quantum-pecos/dist/*.tar.gz
236230

237231
build_wheels_quantum_pecos:
238-
needs: [check_pr_push, build_wheels_pecos_rslib]
239-
if: |
240-
needs.build_wheels_pecos_rslib.result == 'success' &&
241-
(needs.check_pr_push.result == 'success' && needs.check_pr_push.outputs.run == 'true' || needs.check_pr_push.result == 'skipped') &&
242-
(github.event_name != 'pull_request' || github.event.pull_request.merged == true || github.event.action == 'opened' || github.event.action == 'synchronize')
232+
needs: build_wheels_pecos_rslib
233+
if: needs.build_wheels_pecos_rslib.result == 'success'
243234
runs-on: ubuntu-latest
244235

245236
steps:

0 commit comments

Comments
 (0)