Skip to content

Commit 2bea383

Browse files
committed
🐛🧪 Fix referencing GHA artifact @ whl builders
It wasn't obvious right away, but referencing a job in the `${{ needs }}` context that is not being depended on, and does not even exist, silently returned an empty string for the whole expression passed to the `name:` input of the `download-artifact` action invocations. This subsequently triggered the behavior of said action to change to "download all the artifacts that exist in the workflow". This "download all" behavior has an additional quirk, though — it downloads each artifact in a subdirectory named after the artifact name. The behavior of the "download one specific artifact" mode, on the other hand, is different in that it does not create an extra level of nesting. This was the reason why it felt necessary to unpack two-levels deep sdist tarballs in the first place. With this patch, references to said sdists will change.
1 parent 772528e commit 2bea383

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ env:
2929
jobs:
3030
python_sdist:
3131
runs-on: ubuntu-22.04
32+
outputs:
33+
artifact_name: ${{ steps.build_sdist.outputs.artifact_name }}
3234
steps:
3335
- name: clone repo
3436
uses: actions/checkout@v4
@@ -258,7 +260,7 @@ jobs:
258260
id: fetch_sdist
259261
uses: actions/download-artifact@v4
260262
with:
261-
name: ${{ needs.build_sdist.outputs.artifact_name }}
263+
name: ${{ needs.python_sdist.outputs.artifact_name }}
262264

263265
- name: configure docker foreign arch support
264266
uses: docker/setup-qemu-action@v3
@@ -389,7 +391,7 @@ jobs:
389391
id: fetch_sdist
390392
uses: actions/download-artifact@v4
391393
with:
392-
name: ${{ needs.build_sdist.outputs.artifact_name }}
394+
name: ${{ needs.python_sdist.outputs.artifact_name }}
393395

394396
- name: install python
395397
uses: actions/setup-python@v5
@@ -492,7 +494,7 @@ jobs:
492494
id: fetch_sdist
493495
uses: actions/download-artifact@v4
494496
with:
495-
name: ${{ needs.build_sdist.outputs.artifact_name }}
497+
name: ${{ needs.python_sdist.outputs.artifact_name }}
496498

497499
- name: build/test wheels
498500
id: build

0 commit comments

Comments
 (0)