Skip to content

Commit fbdf607

Browse files
hugovkradarhere
andauthored
Wheels CI: Check number of expected dists (#9239)
Co-authored-by: Andrew Murray <[email protected]> Co-authored-by: Andrew Murray <[email protected]>
1 parent 9fd4af5 commit fbdf607

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/wheels.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ concurrency:
3939
cancel-in-progress: true
4040

4141
env:
42+
EXPECTED_DISTS: 91
4243
FORCE_COLOR: 1
4344

4445
jobs:
@@ -250,9 +251,27 @@ jobs:
250251
name: dist-sdist
251252
path: dist/*.tar.gz
252253

254+
count-dists:
255+
needs: [build-native-wheels, windows, sdist]
256+
runs-on: ubuntu-latest
257+
name: Count dists
258+
steps:
259+
- uses: actions/download-artifact@v5
260+
with:
261+
pattern: dist-*
262+
path: dist
263+
merge-multiple: true
264+
- name: "What did we get?"
265+
run: |
266+
ls -alR
267+
echo "Number of dists, should be $EXPECTED_DISTS:"
268+
files=$(ls dist 2>/dev/null | wc -l)
269+
echo $files
270+
[ "$files" -eq $EXPECTED_DISTS ] || exit 1
271+
253272
scientific-python-nightly-wheels-publish:
254273
if: github.repository_owner == 'python-pillow' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
255-
needs: [build-native-wheels, windows]
274+
needs: count-dists
256275
runs-on: ubuntu-latest
257276
name: Upload wheels to scientific-python-nightly-wheels
258277
steps:
@@ -269,7 +288,7 @@ jobs:
269288

270289
pypi-publish:
271290
if: github.repository_owner == 'python-pillow' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
272-
needs: [build-native-wheels, windows, sdist]
291+
needs: count-dists
273292
runs-on: ubuntu-latest
274293
name: Upload release to PyPI
275294
environment:

0 commit comments

Comments
 (0)