11name : Build and Deploy Package
22
3- on : workflow_dispatch
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ upload_to_pypi :
7+ description : ' Upload to PyPI after building'
8+ required : true
9+ default : false
10+ type : boolean
411
512jobs :
613 build_wheels :
@@ -11,14 +18,15 @@ jobs:
1118 os : [ubuntu-22.04, macos-13, windows-latest]
1219
1320 env :
14- CIBW_BUILD : " cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* pp37-* pp38-* pp39-* pp310 -*"
15- CIBW_SKIP : " cp36-* pp* *-win_arm64 *-musllinux_aarch64"
21+ CIBW_BUILD : " cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314 -*"
22+ CIBW_SKIP : " *-win_arm64 *-musllinux_aarch64"
1623 CIBW_ARCHS_LINUX : " x86_64 i686 aarch64"
1724
1825 steps :
1926 - uses : actions/checkout@v5
2027 with :
2128 submodules : " recursive"
29+ fetch-depth : 0
2230
2331 - name : Setup QEMU # Needed to build aarch64 wheels
2432 if : runner.os == 'Linux'
2735 platforms : all
2836
2937 - name : Build wheels
30- uses : pypa/cibuildwheel@v2.23.3
38+ uses : pypa/cibuildwheel@v3.2.1
3139
3240 - uses : actions/upload-artifact@v5
3341 with :
@@ -46,12 +54,13 @@ jobs:
4654 - uses : actions/checkout@v5
4755 with :
4856 submodules : " recursive"
57+ fetch-depth : 0
4958
5059 - name : Build wheels
51- uses : pypa/cibuildwheel@v2.23.3
60+ uses : pypa/cibuildwheel@v3.2.1
5261 env :
5362 CIBW_BUILD : ${{ matrix.cibw_build }}
54- CIBW_SKIP : " cp36-* pp*"
63+ CIBW_SKIP : " pp*"
5564 CIBW_ARCHS : ${{ matrix.cibw_archs }}
5665 CIBW_REPAIR_WHEEL_COMMAND : |
5766 echo "Target delocate archs: {delocate_archs}"
8796 - uses : actions/checkout@v5
8897 with :
8998 submodules : " recursive"
99+ fetch-depth : 0
90100
91101 - name : Build sdist
92102 run : |
@@ -101,7 +111,7 @@ jobs:
101111 upload_pypi :
102112 needs : [build_wheels, build_wheels_macos_arm64, build_sdist]
103113 runs-on : ubuntu-22.04
104- # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
114+ if : ${{ inputs.upload_to_pypi }}
105115 steps :
106116 - uses : actions/download-artifact@v6
107117 with :
0 commit comments