1- name : Build wheels
1+ name : Build Python Dist
22
33on :
44 workflow_dispatch :
55
66jobs :
7- build_wheels :
7+ build-wheels :
88 name : Build wheels on ${{ matrix.os }}
99 runs-on : ${{ matrix.os }}
1010 strategy :
1111 fail-fast : false
1212 matrix :
1313 include :
1414 - os : ubuntu-latest
15- cibw-archs : x86_64
1615 - os : windows-latest
17- cibw-archs : AMD64
1816 - os : macos-15
19- cibw-archs : arm64
2017 deployment-target : ' 14.0'
2118 - os : macos-15-intel
22- cibw-archs : x86_64
2319 deployment-target : ' 13.0'
2420
2521 steps :
2824 fetch-depth : 0
2925
3026 - name : Cache ITK build
31- uses : actions/cache@v4
27+ uses : actions/cache@v5
3228 with :
3329 path : ${{ github.workspace }}/itk-build
3430 key : itk-5.4.5-${{ matrix.os }}
5753 - name : Build wheels
5854 uses : pypa/cibuildwheel@v3.4.0
5955 env :
60- CIBW_BUILD : cp313-*
61- CIBW_SKIP : ' *-win32 *-manylinux_i686 *-musllinux*'
62- CIBW_ARCHS : ${{ matrix.cibw-archs }}
63- CIBW_MANYLINUX_X86_64_IMAGE : manylinux_2_28
56+ CIBW_BUILD : ' cp310-* cp311-* cp312-* cp313-* cp314-*'
57+ CIBW_SKIP : ' *-musllinux* *i686 *-win32'
6458 CIBW_CONTAINER_ENGINE : " docker; create_args: --volume ${{ github.workspace }}/itk-build:/itk-build"
6559 CIBW_BEFORE_ALL_LINUX : |
6660 git clone --depth 1 --branch v5.4.5 https://github.com/InsightSoftwareConsortium/ITK.git /tmp/ITK
@@ -70,23 +64,46 @@ jobs:
7064 fi
7165 CIBW_ENVIRONMENT_LINUX : ITK_DIR=/itk-build
7266 CIBW_ENVIRONMENT_MACOS : ITK_DIR=${{ github.workspace }}/itk-build MACOSX_DEPLOYMENT_TARGET=${{ matrix.deployment-target }}
73- CIBW_ENVIRONMENT_WINDOWS : ITK_DIR=${{ github.workspace }}\itk-build SKBUILD_BUILD_DIR=D:\\b
67+ CIBW_ENVIRONMENT_WINDOWS : ITK_DIR=' ${{ github.workspace }}\itk-build' SKBUILD_BUILD_DIR=' D:\b'
7468
75- - uses : actions/upload-artifact@v4
69+ - uses : actions/upload-artifact@v6
7670 with :
7771 name : wheels-${{ matrix.os }}
7872 path : ./wheelhouse/*.whl
7973
74+ build-sdist :
75+ name : Build source distribution
76+ runs-on : ubuntu-latest
77+ steps :
78+ - uses : actions/checkout@v6
79+ with :
80+ fetch-depth : 0
81+
82+ - uses : actions/setup-python@v6
83+ with :
84+ python-version : ' 3.13'
85+
86+ - name : Install build
87+ run : pip install build
88+
89+ - name : Build sdist
90+ run : python -m build --sdist
91+
92+ - uses : actions/upload-artifact@v6
93+ with :
94+ name : sdist
95+ path : dist/*.tar.gz
96+
8097 publish :
81- name : Publish wheels to PyPI
82- needs : build_wheels
98+ name : Publish to PyPI
99+ needs : [build-wheels, build-sdist]
83100 runs-on : ubuntu-latest
84101 if : startsWith(github.ref, 'refs/tags/')
85102 steps :
86- - uses : actions/download-artifact@v4
103+ - uses : actions/download-artifact@v8
87104 with :
88105 path : dist
89- pattern : wheels-*
106+ pattern : ' { wheels-*,sdist} '
90107 merge-multiple : true
91108
92109 - uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments