2929jobs :
3030 python_sdist :
3131 runs-on : ubuntu-22.04
32+ outputs :
33+ sdist_artifact_name : ${{ steps.build_sdist.outputs.sdist_artifact_name }}
34+ package_version : ${{ steps.build_sdist.outputs.package_version }}
3235 steps :
3336 - name : clone repo
3437 uses : actions/checkout@v4
@@ -45,13 +48,14 @@ jobs:
4548 python -m pip install build
4649 python -m build --sdist
4750
48- echo "artifact_name=$(ls ./dist)" >> "$GITHUB_OUTPUT"
51+ echo "sdist_artifact_name=$(ls ./dist)" >> "$GITHUB_OUTPUT"
52+ echo "package_version=$(ls ./dist | sed -En 's/cffi-(.+)\.tar\.gz/\1/p')" >> "$GITHUB_OUTPUT"
4953
5054 - name : upload sdist artifact
5155 uses : actions/upload-artifact@v4
5256 with :
53- name : ${{ steps.build_sdist.outputs.artifact_name }}
54- path : dist/${{ steps.build_sdist.outputs.artifact_name }}
57+ name : ${{ steps.build_sdist.outputs.sdist_artifact_name }}
58+ path : dist/${{ steps.build_sdist.outputs.sdist_artifact_name }}
5559 if-no-files-found : error
5660 # always upload the sdist artifact- all the wheel build jobs require it
5761
@@ -261,7 +265,7 @@ jobs:
261265 id : fetch_sdist
262266 uses : actions/download-artifact@v4
263267 with :
264- name : ${{ needs.build_sdist .outputs.artifact_name }}
268+ name : ${{ needs.python_sdist .outputs.sdist_artifact_name }}
265269
266270 - name : configure docker foreign arch support
267271 uses : docker/setup-qemu-action@v3
@@ -301,7 +305,7 @@ jobs:
301305
302306 mkdir cffi
303307
304- tar zxf ${{ steps.fetch_sdist.outputs.download-path }}/cffi*.tar.gz/cffi*.tar.gz --strip-components=1 -C cffi
308+ tar zxf ${{ steps.fetch_sdist.outputs.download-path }}/cffi*.tar.gz --strip-components=1 -C cffi
305309 python -m pip install --upgrade "${{ matrix.cibw_version || 'cibuildwheel' }}"
306310
307311 # actually build libffi + wheel (using env tweaks above)
@@ -394,7 +398,7 @@ jobs:
394398 id : fetch_sdist
395399 uses : actions/download-artifact@v4
396400 with :
397- name : ${{ needs.build_sdist .outputs.artifact_name }}
401+ name : ${{ needs.python_sdist .outputs.sdist_artifact_name }}
398402
399403 - name : install python
400404 uses : actions/setup-python@v5
@@ -422,7 +426,7 @@ jobs:
422426
423427 mkdir cffi
424428
425- tar zxf ${{ steps.fetch_sdist.outputs.download-path }}/cffi*.tar.gz/cffi*.tar.gz --strip-components=1 -C cffi
429+ tar zxf ${{ steps.fetch_sdist.outputs.download-path }}/cffi*.tar.gz --strip-components=1 -C cffi
426430
427431 python3 -m cibuildwheel --output-dir dist cffi
428432
@@ -497,7 +501,7 @@ jobs:
497501 id : fetch_sdist
498502 uses : actions/download-artifact@v4
499503 with :
500- name : ${{ needs.build_sdist .outputs.artifact_name }}
504+ name : ${{ needs.python_sdist .outputs.sdist_artifact_name }}
501505
502506 - name : build/test wheels
503507 id : build
@@ -513,7 +517,7 @@ jobs:
513517
514518 mkdir cffi
515519
516- tar zxf cffi*.tar.gz/cffi*.tar.gz --strip-components=1 -C cffi
520+ tar zxf cffi*.tar.gz --strip-components=1 -C cffi
517521
518522 python -m pip install --upgrade pip
519523 pip install "${{ matrix.cibw_version || 'cibuildwheel'}}"
@@ -538,7 +542,7 @@ jobs:
538542 - name : merge all artifacts
539543 uses : actions/upload-artifact/merge@v4
540544 with :
541- name : dist
545+ name : dist-cffi-${{ needs.python_sdist.outputs.package_version }}
542546 delete-merged : true
543547 if : ${{ env.skip_artifact_upload != 'true' }}
544548
0 commit comments