11
11
- published
12
12
13
13
jobs :
14
- build :
15
- name : Build
14
+ build-sdist :
15
+ name : Build source distribution
16
16
runs-on : ubuntu-latest
17
17
steps :
18
18
- uses : actions/checkout@v4
19
19
- name : Build sdist
20
20
run : pipx run build --sdist
21
+ - uses : actions/upload-artifact@v4
22
+ with :
23
+ if-no-files-found : error
24
+ compression-level : 0
25
+ name : cibw-sdist
26
+ path : dist/*.tar.gz
27
+
28
+ build-wheels :
29
+ name : Build wheels on ${{ matrix.os }}
30
+ runs-on : ${{ matrix.os }}
31
+ strategy :
32
+ matrix :
33
+ os : [ubuntu-24.04, ubuntu-24.04-arm]
34
+ steps :
35
+ - uses : actions/checkout@v4
21
36
- name : Build wheels
22
37
23
- - name : Prepare for artifact upload
24
- run : |
25
- mkdir out
26
- mv -t out dist/*.tar.gz
27
- mv -t out wheelhouse/*.whl
28
38
- uses : actions/upload-artifact@v4
29
39
with :
30
40
if-no-files-found : error
31
41
compression-level : 0
32
- path : out/
42
+ name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
43
+ path : ./wheelhouse/*.whl
33
44
34
45
test-pypi-publish :
35
46
name : Upload release to TestPyPI
36
- needs : [build]
47
+ needs : [build-sdist, build-wheels ]
37
48
runs-on : ubuntu-latest
38
49
environment : test-pypi
39
50
permissions :
@@ -42,16 +53,17 @@ jobs:
42
53
steps :
43
54
- uses : actions/download-artifact@v4
44
55
with :
45
- name : artifact
56
+ pattern : cibw-*
46
57
path : dist
58
+ merge-multiple : true
47
59
- name : Publish package distributions to PyPI
48
60
uses : pypa/gh-action-pypi-publish@release/v1
49
61
with :
50
62
repository-url : https://test.pypi.org/legacy/
51
63
52
64
pypi-publish :
53
65
name : Upload release to PyPI
54
- needs : [build, test-pypi-publish]
66
+ needs : [build-sdist, build-wheels , test-pypi-publish]
55
67
runs-on : ubuntu-latest
56
68
environment : pypi
57
69
permissions :
60
72
steps :
61
73
- uses : actions/download-artifact@v4
62
74
with :
63
- name : artifact
75
+ pattern : cibw-*
64
76
path : dist
77
+ merge-multiple : true
65
78
- name : Publish package distributions to PyPI
66
79
uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments