Skip to content

Commit 4d3df6f

Browse files
committed
testing win
1 parent 9de1629 commit 4d3df6f

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

.github/workflows/release_and_pypi.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
11
name: Release and Publish to TestPyPI
22

33
on:
4+
push:
5+
branches:
6+
- sep-workflows
7+
tags:
8+
- "v*"
49
workflow_run:
5-
workflows: [Build linux", "Build win", "Build Macos"]
10+
workflows: ["Build linux", "Build win", "Build Macos"]
611
types:
712
- completed
813

914
jobs:
15+
check_tag:
16+
runs-on: ubuntu-latest
17+
if: startsWith(github.ref, 'refs/tags/v')
18+
steps:
19+
- name: Check if tag
20+
run: echo "This is a tag push"
21+
1022
wait_for_workflows:
23+
needs: check_tag
1124
runs-on: ubuntu-latest
1225
if: >
26+
github.event_name == 'workflow_run' &&
1327
github.event.workflow_run.conclusion == 'success' &&
1428
startsWith(github.event.workflow_run.head_branch, 'v')
1529
steps:
@@ -18,40 +32,41 @@ jobs:
1832
with:
1933
ref: ${{ github.event.workflow_run.head_sha }}
2034
check-name: "Build wheels on Linux"
21-
repo-token: ${{ secrets.GITHUB_TOKEN }}
35+
repo-token: ${{ secrets.ACCESS_TOKEN }}
2236
wait-interval: 10
2337

2438
- name: Wait for Windows workflow
2539
uses: lewagon/wait-on-check-action@v1.3.1
2640
with:
2741
ref: ${{ github.event.workflow_run.head_sha }}
2842
check-name: "Build wheels on Windows"
29-
repo-token: ${{ secrets.GITHUB_TOKEN }}
43+
repo-token: ${{ secrets.ACCESS_TOKEN }}
3044
wait-interval: 10
3145

3246
- name: Wait for macOS-13 workflow
3347
uses: lewagon/wait-on-check-action@v1.3.1
3448
with:
3549
ref: ${{ github.event.workflow_run.head_sha }}
3650
check-name: "Build wheels on macos-13"
37-
repo-token: ${{ secrets.GITHUB_TOKEN }}
51+
repo-token: ${{ secrets.ACCESS_TOKEN }}
3852
wait-interval: 10
3953

4054
- name: Wait for macOS-14 workflow
4155
uses: lewagon/wait-on-check-action@v1.3.1
4256
with:
4357
ref: ${{ github.event.workflow_run.head_sha }}
4458
check-name: "Build wheels on macos-14"
45-
repo-token: ${{ secrets.GITHUB_TOKEN }}
59+
repo-token: ${{ secrets.ACCESS_TOKEN }}
4660
wait-interval: 10
4761

4862
release_and_publish:
4963
needs: wait_for_workflows
50-
name: Release and Publish
5164
runs-on: ubuntu-latest
5265
steps:
5366
- name: Checkout code
5467
uses: actions/checkout@v3
68+
with:
69+
fetch-depth: 0
5570

5671
- name: Download macOS artifacts (macos-13)
5772
uses: actions/download-artifact@v3
@@ -91,8 +106,8 @@ jobs:
91106

92107
- name: Create Release
93108
env:
94-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
95110
uses: softprops/action-gh-release@v1
96111
with:
97112
files: ./dist/**/*.whl
98-
tag_name: ${{ github.event.workflow_run.head_branch }}
113+
tag_name: ${{ github.ref_name }}

0 commit comments

Comments
 (0)