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
22on :
33 push :
44 branches : [main]
5- create :
5+ release :
6+ types :
7+ - published
68 workflow_dispatch :
79
810jobs :
3436 CIBW_SKIP : " pp* cp38-macosx_*"
3537
3638 - name : Build sdist
37- if : runner.os == 'Linux'
39+ if : runner.os == 'Linux' && runner.arch == 'X64'
3840 run : |
3941 pip install build
4042 python -m build -s -o wheelhouse
4446 with :
4547 name : wheels-${{ matrix.os }}
4648 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