Skip to content

Commit b326b79

Browse files
committed
fix: improve build matrix for better control
- Explicitly define all build combinations - Add architecture to artifact names - Improve job naming for better visibility
1 parent f28114f commit b326b79

1 file changed

Lines changed: 54 additions & 6 deletions

File tree

.github/workflows/build-wheels.yml

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,48 @@ on:
88

99
jobs:
1010
build_wheels:
11-
name: Build wheels on ${{ matrix.os }}
11+
name: Build wheels on ${{ matrix.os }} ${{ matrix.arch }}
1212
runs-on: ${{ matrix.os }}
1313
permissions:
1414
contents: write
1515
strategy:
1616
matrix:
17-
os: [ubuntu-latest, windows-latest, macos-latest]
18-
python-version: ['3.10', '3.11', '3.12']
1917
include:
18+
# Linux builds
19+
- os: ubuntu-latest
20+
python-version: '3.10'
21+
- os: ubuntu-latest
22+
python-version: '3.11'
23+
- os: ubuntu-latest
24+
python-version: '3.12'
25+
26+
# Windows builds
27+
- os: windows-latest
28+
python-version: '3.10'
29+
- os: windows-latest
30+
python-version: '3.11'
31+
- os: windows-latest
32+
python-version: '3.12'
33+
34+
# macOS builds
2035
- os: macos-latest
21-
arch: arm64
36+
python-version: '3.10'
37+
arch: x86_64
2238
- os: macos-latest
39+
python-version: '3.11'
2340
arch: x86_64
41+
- os: macos-latest
42+
python-version: '3.12'
43+
arch: x86_64
44+
- os: macos-latest
45+
python-version: '3.10'
46+
arch: arm64
47+
- os: macos-latest
48+
python-version: '3.11'
49+
arch: arm64
50+
- os: macos-latest
51+
python-version: '3.12'
52+
arch: arm64
2453

2554
steps:
2655
- uses: actions/checkout@v4
@@ -63,8 +92,27 @@ jobs:
6392
run: python -m build --sdist --outdir dist/
6493
shell: bash
6594

66-
- name: Upload to GitHub Release
67-
if: startsWith(github.ref, 'refs/tags/')
95+
- name: Upload to GitHub Actions
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: dist-${{ matrix.os }}-${{ matrix.arch }}-py${{ matrix.python-version }}
99+
path: dist/*
100+
101+
release:
102+
needs: build_wheels
103+
runs-on: ubuntu-latest
104+
if: startsWith(github.ref, 'refs/tags/')
105+
permissions:
106+
contents: write
107+
steps:
108+
- name: Download all artifacts
109+
uses: actions/download-artifact@v4
110+
with:
111+
pattern: dist-*
112+
path: dist
113+
merge-multiple: true
114+
115+
- name: Create Release
68116
uses: softprops/action-gh-release@v1
69117
with:
70118
files: dist/*

0 commit comments

Comments
 (0)