File tree Expand file tree Collapse file tree 1 file changed +45
-3
lines changed Expand file tree Collapse file tree 1 file changed +45
-3
lines changed Original file line number Diff line number Diff line change 1
- name : Build Wheels
1
+ name : Build sdist and Wheels
2
2
on :
3
3
push :
4
4
branches : [main]
5
- create :
5
+ release :
6
+ types :
7
+ - published
6
8
workflow_dispatch :
7
9
8
10
jobs :
34
36
CIBW_SKIP : " pp* cp38-macosx_*"
35
37
36
38
- name : Build sdist
37
- if : runner.os == 'Linux'
39
+ if : runner.os == 'Linux' && runner.arch == 'X64'
38
40
run : |
39
41
pip install build
40
42
python -m build -s -o wheelhouse
44
46
with :
45
47
name : wheels-${{ matrix.os }}
46
48
path : wheelhouse
49
+
50
+ # combine all wheels into one artifact
51
+ combine_wheels :
52
+ needs : [build_wheels]
53
+ runs-on : ubuntu-latest
54
+ steps :
55
+ - uses : actions/download-artifact@v4
56
+ with :
57
+ # unpacks all CIBW artifacts into dist/
58
+ pattern : wheels-*
59
+ path : dist
60
+ merge-multiple : true
61
+
62
+ - name : Upload Wheels to artifact
63
+ uses : actions/upload-artifact@v4
64
+ with :
65
+ name : wheels-all
66
+ path : dist
67
+
68
+ # https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
69
+ upload_pypi :
70
+ needs : [build_wheels]
71
+ runs-on : ubuntu-latest
72
+ environment : pypi
73
+ permissions :
74
+ id-token : write
75
+ if : github.event_name == 'release' && github.event.action == 'published'
76
+ # or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
77
+ # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
78
+ steps :
79
+ - uses : actions/download-artifact@v4
80
+ with :
81
+ # unpacks all CIBW artifacts into dist/
82
+ pattern : wheels-*
83
+ path : dist
84
+ merge-multiple : true
85
+
86
+ - uses : pypa/gh-action-pypi-publish@release/v1
87
+ # with:
88
+ # To test: repository-url: https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments