@@ -123,19 +123,29 @@ jobs:
123123 - name : Validate build output
124124 shell : bash
125125 run : |
126- python -m pip install twine
127- ls dist/
128-
126+ if [ -d dist ]; then
127+ ls dist/
128+ else
129+ echo "Missing required directory 'dist' at $(pwd)"
130+ exit -1
131+ fi
132+ echo "All wheels"
133+ ls -al dist/*.whl
129134 MANYLINUX_PLATFORM=${{ matrix.manylinux-platform }}
130135 MANYLINUX_VERSION=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 1)`
131136 TARGET_ARCH_NAME=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 2)`
132137 if [[ ${TARGET_ARCH_NAME} == "x64" ]]; then
133138 TARGET_ARCH_NAME="x86_64" # Match auditwheel naming convention
134139 fi
135140 WHEEL_PATTERN="dist/itk_*cp3${{ matrix.python3-minor-version }}*manylinux${MANYLINUX_VERSION}*${TARGET_ARCH_NAME}.whl"
136-
137141 echo "Searching for wheels matching pattern ${WHEEL_PATTERN}"
138- python -m twine check ${WHEEL_PATTERN}
142+ if [ -f "${WHEEL_PATTERN}" ]; then
143+ python -m pip install twine
144+ python -m twine check ${WHEEL_PATTERN}
145+ else
146+ echo "Wheel pattern not found"
147+ exit -1
148+ fi
139149
140150 - name : Publish Python package as GitHub Artifact
141151 uses : actions/upload-artifact@v4
@@ -206,8 +216,14 @@ jobs:
206216 - name : Validate build output
207217 shell : bash
208218 run : |
209- python -m pip install twine
210- ls dist/
219+ if [ -d dist ]; then
220+ ls dist/
221+ else
222+ echo "Missing required directory 'dist' at $(pwd)"
223+ exit -1
224+ fi
225+ echo "All wheels"
226+ ls -al dist/*.whl
211227
212228 MANYLINUX_PLATFORM="_2_28-aarch64"
213229 MANYLINUX_VERSION=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 1)`
@@ -218,6 +234,7 @@ jobs:
218234 WHEEL_PATTERN="dist/itk_*cp3${{ matrix.python3-minor-version }}*manylinux${MANYLINUX_VERSION}*${TARGET_ARCH_NAME}.whl"
219235
220236 echo "Searching for wheels matching pattern ${WHEEL_PATTERN}"
237+ python -m pip install twine
221238 python -m twine check ${WHEEL_PATTERN}
222239
223240 - name : Publish Python package as GitHub Artifact
@@ -283,8 +300,14 @@ jobs:
283300 if : matrix.python3-minor-version != '8'
284301 shell : bash
285302 run : |
286- python -m pip install twine
287- ls dist/
303+ if [ -d dist ]; then
304+ ls dist/
305+ else
306+ echo "Missing required directory 'dist' at $(pwd)"
307+ exit -1
308+ fi
309+ echo "All wheels"
310+ ls -al dist/*.whl
288311
289312 WHEEL_PATTERN="dist/itk_*macosx*.whl"
290313 EXPECTED_WHEEL_COUNT=1
@@ -295,6 +318,7 @@ jobs:
295318 exit 1
296319 fi
297320
321+ python -m pip install twine
298322 python -m twine check ${WHEEL_PATTERN}
299323
300324 - name : Publish Python package as GitHub Artifact
@@ -367,12 +391,12 @@ jobs:
367391 - name : Validate build output
368392 shell : pwsh
369393 run : |
370- python -m pip install twine
371394 ls dist/
372395
373396 $WHEEL_PATTERN = "dist/itk_*cp3${{ matrix.python3-minor-version }}*win*.whl"
374397 echo "Searching for wheels matching pattern ${WHEEL_PATTERN}"
375398
399+ python -m pip install twine
376400 python -m twine check ${WHEEL_PATTERN}
377401
378402 - name : Publish Python package as GitHub Artifact
0 commit comments