Skip to content

Commit 3bbb99e

Browse files
committed
Generate stubs on release.
1 parent 6c8e40c commit 3bbb99e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,23 @@ permissions:
99
contents: read
1010

1111
jobs:
12+
generate-stubs:
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: ./.github/actions/setup
17+
- name: Generate type stubs
18+
run: |
19+
cargo build --release -p processing_pyo3
20+
cargo run --release -p generate_stubs
21+
- uses: actions/upload-artifact@v4
22+
with:
23+
name: type-stubs
24+
path: crates/processing_pyo3/mewnala/__init__.pyi
25+
1226
linux:
1327
runs-on: ubuntu-22.04
28+
needs: generate-stubs
1429
strategy:
1530
matrix:
1631
target: [x86_64, aarch64]
@@ -19,6 +34,10 @@ jobs:
1934
- uses: actions/setup-python@v5
2035
with:
2136
python-version: '3.x'
37+
- uses: actions/download-artifact@v4
38+
with:
39+
name: type-stubs
40+
path: crates/processing_pyo3/mewnala
2241
- name: Setup QEMU
2342
if: matrix.target == 'aarch64'
2443
uses: docker/setup-qemu-action@v3
@@ -40,6 +59,7 @@ jobs:
4059

4160
macos:
4261
runs-on: ${{ matrix.runner }}
62+
needs: generate-stubs
4363
strategy:
4464
matrix:
4565
include:
@@ -52,6 +72,10 @@ jobs:
5272
- uses: actions/setup-python@v5
5373
with:
5474
python-version: '3.x'
75+
- uses: actions/download-artifact@v4
76+
with:
77+
name: type-stubs
78+
path: crates/processing_pyo3/mewnala
5579
- name: Build wheels
5680
uses: PyO3/maturin-action@v1
5781
with:
@@ -65,11 +89,16 @@ jobs:
6589

6690
windows:
6791
runs-on: windows-latest
92+
needs: generate-stubs
6893
steps:
6994
- uses: actions/checkout@v4
7095
- uses: actions/setup-python@v5
7196
with:
7297
python-version: '3.x'
98+
- uses: actions/download-artifact@v4
99+
with:
100+
name: type-stubs
101+
path: crates/processing_pyo3/mewnala
73102
- name: Build wheels
74103
uses: PyO3/maturin-action@v1
75104
with:
@@ -83,8 +112,13 @@ jobs:
83112

84113
sdist:
85114
runs-on: ubuntu-latest
115+
needs: generate-stubs
86116
steps:
87117
- uses: actions/checkout@v4
118+
- uses: actions/download-artifact@v4
119+
with:
120+
name: type-stubs
121+
path: crates/processing_pyo3/mewnala
88122
- name: Build sdist
89123
uses: PyO3/maturin-action@v1
90124
with:

0 commit comments

Comments
 (0)