Skip to content

Commit 9648407

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 b15583c commit 9648407

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
@@ -386,7 +388,7 @@ jobs:
386388
id: fetch_sdist
387389
uses: actions/download-artifact@v4
388390
with:
389-
name: ${{ needs.build_sdist.outputs.artifact_name }}
391+
name: ${{ needs.python_sdist.outputs.artifact_name }}
390392

391393
- name: install python
392394
uses: actions/setup-python@v5
@@ -488,7 +490,7 @@ jobs:
488490
id: fetch_sdist
489491
uses: actions/download-artifact@v4
490492
with:
491-
name: ${{ needs.build_sdist.outputs.artifact_name }}
493+
name: ${{ needs.python_sdist.outputs.artifact_name }}
492494

493495
- name: build/test wheels
494496
uses: pypa/[email protected]

0 commit comments

Comments
 (0)