Skip to content

Commit f6c3706

Browse files
committed
testing win
1 parent eda1a31 commit f6c3706

File tree

1 file changed

+28
-58
lines changed

1 file changed

+28
-58
lines changed
Lines changed: 28 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,43 @@
11
name: Release and Publish to TestPyPI
22

33
on:
4-
push:
5-
branches:
6-
- sep-workflows
7-
tags:
8-
- "v*"
9-
workflow_dispatch:
4+
workflow_run:
5+
workflows: ["Build Macos", "Build linux", "Build win"]
6+
types:
7+
- completed
108

119
jobs:
12-
wait_for_builds:
13-
name: Wait for build workflows
10+
release_and_publish:
11+
name: Release and Publish
1412
runs-on: ubuntu-latest
13+
if: ${{ github.event.workflow_run.conclusion == 'success' && startsWith(github.ref, 'refs/tags/') }}
1514
steps:
16-
- name: Wait for Windows build
17-
uses: lewagon/wait-on-check-action@v1.3.1
18-
with:
19-
ref: ${{ github.ref }}
20-
check-name: "build_windows.yml"
21-
repo-token: ${{ secrets.GITHUB_TOKEN }}
22-
wait-interval: 10
15+
- name: Checkout code
16+
uses: actions/checkout@v3
2317

24-
- name: Wait for macOS build
25-
uses: lewagon/wait-on-check-action@v1.3.1
18+
- name: Download macOS artifacts
19+
uses: actions/download-artifact@v3
2620
with:
27-
ref: ${{ github.ref }}
28-
check-name: "build_macos.yml"
29-
repo-token: ${{ secrets.GITHUB_TOKEN }}
30-
wait-interval: 10
21+
name: wheels-macos-13
22+
path: dist/macos-13
3123

32-
- name: Wait for Linux build
33-
uses: lewagon/wait-on-check-action@v1.3.1
24+
- name: Download macOS artifacts
25+
uses: actions/download-artifact@v3
3426
with:
35-
ref: ${{ github.ref }}
36-
check-name: "build_linux.yml"
37-
repo-token: ${{ secrets.GITHUB_TOKEN }}
38-
wait-interval: 10
27+
name: wheels-macos-14
28+
path: dist/macos-14
3929

40-
publish_to_testpypi:
41-
name: Publish to TestPyPI
42-
needs: wait_for_builds
43-
runs-on: ubuntu-latest
44-
if: startsWith(github.ref, 'refs/tags/')
45-
steps:
46-
- name: Checkout code
47-
uses: actions/checkout@v3
30+
- name: Download Linux artifacts
31+
uses: actions/download-artifact@v3
32+
with:
33+
name: wheels-linux
34+
path: dist/linux
4835

49-
- name: Download all workflow run artifacts
36+
- name: Download Windows artifacts
5037
uses: actions/download-artifact@v3
5138
with:
52-
path: dist
39+
name: wheels-windows-x64
40+
path: dist/windows
5341

5442
- name: Display structure of downloaded files
5543
run: ls -R
@@ -61,29 +49,11 @@ jobs:
6149
user: __token__
6250
password: ${{ secrets.PYPI_API_TOKEN }}
6351
repository-url: https://test.pypi.org/legacy/
64-
packages-dir: dist/*
65-
66-
create_release:
67-
name: Create Release
68-
needs: publish_to_testpypi
69-
runs-on: ubuntu-latest
70-
if: startsWith(github.ref, 'refs/tags/')
71-
steps:
72-
- name: Checkout code
73-
uses: actions/checkout@v3
74-
75-
- name: Download all workflow run artifacts
76-
uses: actions/download-artifact@v3
77-
with:
78-
path: artifacts
79-
80-
- name: Display structure of downloaded files
81-
run: ls -R
82-
working-directory: artifacts
52+
packages-dir: dist
8353

8454
- name: Create Release
8555
env:
86-
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8757
uses: softprops/action-gh-release@v1
8858
with:
89-
files: ./artifacts/**/*.whl
59+
files: ./dist/**/*.whl

0 commit comments

Comments
 (0)