Skip to content

Commit 9de1629

Browse files
committed
testing win
1 parent 9a086e3 commit 9de1629

File tree

1 file changed

+40
-42
lines changed

1 file changed

+40
-42
lines changed

.github/workflows/release_and_pypi.yml

Lines changed: 40 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,77 +2,76 @@ name: Release and Publish to TestPyPI
22

33
on:
44
workflow_run:
5-
workflows: ["Build Macos", "Build linux", "Build win"]
5+
workflows: [Build linux", "Build win", "Build Macos"]
66
types:
77
- completed
8-
push:
9-
branches:
10-
- sep-workflows # or whatever your default branch name is
11-
tags:
12-
- "v*"
138

149
jobs:
15-
debug_job:
16-
name: Debug Job
10+
wait_for_workflows:
1711
runs-on: ubuntu-latest
12+
if: >
13+
github.event.workflow_run.conclusion == 'success' &&
14+
startsWith(github.event.workflow_run.head_branch, 'v')
1815
steps:
19-
- name: Dump GitHub context
20-
env:
21-
GITHUB_CONTEXT: ${{ toJson(github) }}
22-
run: echo "$GITHUB_CONTEXT"
23-
- name: Dump job context
24-
env:
25-
JOB_CONTEXT: ${{ toJson(job) }}
26-
run: echo "$JOB_CONTEXT"
27-
- name: Dump steps context
28-
env:
29-
STEPS_CONTEXT: ${{ toJson(steps) }}
30-
run: echo "$STEPS_CONTEXT"
31-
- name: Dump runner context
32-
env:
33-
RUNNER_CONTEXT: ${{ toJson(runner) }}
34-
run: echo "$RUNNER_CONTEXT"
35-
- name: Dump strategy context
36-
env:
37-
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
38-
run: echo "$STRATEGY_CONTEXT"
39-
- name: Dump matrix context
40-
env:
41-
MATRIX_CONTEXT: ${{ toJson(matrix) }}
42-
run: echo "$MATRIX_CONTEXT"
16+
- name: Wait for Linux workflow
17+
uses: lewagon/wait-on-check-action@v1.3.1
18+
with:
19+
ref: ${{ github.event.workflow_run.head_sha }}
20+
check-name: "Build wheels on Linux"
21+
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
wait-interval: 10
23+
24+
- name: Wait for Windows workflow
25+
uses: lewagon/wait-on-check-action@v1.3.1
26+
with:
27+
ref: ${{ github.event.workflow_run.head_sha }}
28+
check-name: "Build wheels on Windows"
29+
repo-token: ${{ secrets.GITHUB_TOKEN }}
30+
wait-interval: 10
31+
32+
- name: Wait for macOS-13 workflow
33+
uses: lewagon/wait-on-check-action@v1.3.1
34+
with:
35+
ref: ${{ github.event.workflow_run.head_sha }}
36+
check-name: "Build wheels on macos-13"
37+
repo-token: ${{ secrets.GITHUB_TOKEN }}
38+
wait-interval: 10
39+
40+
- name: Wait for macOS-14 workflow
41+
uses: lewagon/wait-on-check-action@v1.3.1
42+
with:
43+
ref: ${{ github.event.workflow_run.head_sha }}
44+
check-name: "Build wheels on macos-14"
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
wait-interval: 10
4347

4448
release_and_publish:
49+
needs: wait_for_workflows
4550
name: Release and Publish
46-
needs: debug_job
4751
runs-on: ubuntu-latest
48-
if: always()
4952
steps:
5053
- name: Checkout code
5154
uses: actions/checkout@v3
5255

53-
- name: Download macOS artifacts
54-
continue-on-error: true
56+
- name: Download macOS artifacts (macos-13)
5557
uses: actions/download-artifact@v3
5658
with:
5759
name: wheels-macos-13
5860
path: dist/macos-13
5961

60-
- name: Download macOS artifacts
61-
continue-on-error: true
62+
- name: Download macOS artifacts (macos-14)
6263
uses: actions/download-artifact@v3
6364
with:
6465
name: wheels-macos-14
6566
path: dist/macos-14
6667

6768
- name: Download Linux artifacts
68-
continue-on-error: true
6969
uses: actions/download-artifact@v3
7070
with:
7171
name: wheels-linux
7272
path: dist/linux
7373

7474
- name: Download Windows artifacts
75-
continue-on-error: true
7675
uses: actions/download-artifact@v3
7776
with:
7877
name: wheels-windows-x64
@@ -83,7 +82,6 @@ jobs:
8382
working-directory: dist
8483

8584
- name: Publish to TestPyPI
86-
if: startsWith(github.ref, 'refs/tags/')
8785
uses: pypa/gh-action-pypi-publish@v1.8.5
8886
with:
8987
user: __token__
@@ -92,9 +90,9 @@ jobs:
9290
packages-dir: dist
9391

9492
- name: Create Release
95-
if: startsWith(github.ref, 'refs/tags/')
9693
env:
9794
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9895
uses: softprops/action-gh-release@v1
9996
with:
10097
files: ./dist/**/*.whl
98+
tag_name: ${{ github.event.workflow_run.head_branch }}

0 commit comments

Comments
 (0)