File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Expand file tree Collapse file tree 1 file changed +27
-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+ # https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
51+ upload_pypi :
52+ needs : [build_wheels]
53+ runs-on : ubuntu-latest
54+ environment : pypi
55+ permissions :
56+ id-token : write
57+ if : github.event_name == 'release' && github.event.action == 'published'
58+ # or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
59+ # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
60+ steps :
61+ - uses : actions/download-artifact@v4
62+ with :
63+ # unpacks all CIBW artifacts into dist/
64+ pattern : wheels-*
65+ path : dist
66+ merge-multiple : true
67+
68+ - uses : pypa/gh-action-pypi-publish@release/v1
69+ # with:
70+ # To test: repository-url: https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments