Skip to content

Commit 6128b0c

Browse files
committed
ci: Split sdist/wheels workflows
Fix more breakage from incompatible {upload,download}-artifact@v4 changes.
1 parent df7e5d4 commit 6128b0c

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

.github/workflows/main.yml

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,26 @@ name: main
33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
build:
6+
sdist:
7+
name: Make source dist
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: '3.10'
16+
- name: Create source dist
17+
run: python setup.py sdist
18+
- name: Upload source dist
19+
uses: actions/upload-artifact@v4
20+
with:
21+
name: sdist
22+
path: dist
23+
if-no-files-found: error
24+
25+
wheels:
726
name: ${{ matrix.pyver }} on ${{ matrix.os }}
827
runs-on: ${{ matrix.os }}
928
permissions:
@@ -21,15 +40,7 @@ jobs:
2140
- uses: actions/setup-python@v5
2241
with:
2342
python-version: '3.10'
24-
- name: Create source dist
25-
run: python setup.py sdist
26-
- name: Upload source dist
27-
uses: actions/upload-artifact@v4
28-
with:
29-
name: dist-${{ matrix.version }}-${{ matrix.pyver }}-${{ matrix.os }}
30-
path: dist
31-
if-no-files-found: error
32-
- name: Build and test wheels
43+
- name: Build and test wheel
3344
uses: pypa/cibuildwheel@v2.17
3445
env:
3546
CIBW_BUILD: ${{ matrix.pyver }}-*
@@ -48,10 +59,10 @@ jobs:
4859
CIBW_TEST_SKIP: "cp38-macosx_arm64"
4960
- name: Inventory
5061
run: ls wheelhouse
51-
- name: Upload wheels
62+
- name: Upload wheel
5263
uses: actions/upload-artifact@v4
5364
with:
54-
name: wheels-${{ matrix.version }}-${{ matrix.pyver }}-${{ matrix.os }}
65+
name: wheel-${{ matrix.version }}-${{ matrix.pyver }}-${{ matrix.os }}
5566
path: wheelhouse/
5667
if-no-files-found: error
5768

@@ -60,7 +71,7 @@ jobs:
6071
runs-on: ubuntu-latest
6172
permissions:
6273
contents: read
63-
needs: build
74+
needs: [sdist, wheels]
6475
if: >
6576
github.event_name == 'push'
6677
&& startsWith(github.ref, 'refs/tags')
@@ -69,12 +80,12 @@ jobs:
6980
- name: Download source packages
7081
uses: actions/download-artifact@v4
7182
with:
72-
pattern: dist-*
83+
name: sdist
7384
path: dist
7485
- name: Download wheels
7586
uses: actions/download-artifact@v4
7687
with:
77-
pattern: wheels-*
88+
pattern: wheel-*
7889
path: dist
7990
merge-multiple: true
8091
- name: List dir content

0 commit comments

Comments
 (0)