Skip to content

Commit 2c49742

Browse files
authored
docs: update examples for v4 of upload-artifact and download-artifact actions (#1705)
* docs: update examples for v4 of `upload-artifact` and `download-artifact` actions * docs: use more unique artifact name * docs: update github example workflows to artifact actions v4
1 parent 6e2f4c0 commit 2c49742

6 files changed

+23
-14
lines changed

Diff for: docs/deliver-to-pypi.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ well as several useful actions. Alongside your existing job(s) that runs cibuild
5656
- name: Build SDist
5757
run: pipx run build --sdist
5858

59-
- uses: actions/upload-artifact@v3
59+
- uses: actions/upload-artifact@v4
6060
with:
61+
name: cibw-sdist
6162
path: dist/*.tar.gz
6263
```
6364
@@ -74,10 +75,11 @@ This requires setting this GitHub workflow in your project's PyPI settings (for
7475
runs-on: ubuntu-latest
7576
if: github.event_name == 'release' && github.event.action == 'published'
7677
steps:
77-
- uses: actions/download-artifact@v3
78+
- uses: actions/download-artifact@v4
7879
with:
79-
name: artifact
80+
pattern: cibw-*
8081
path: dist
82+
merge-multiple: true
8183
8284
- uses: pypa/gh-action-pypi-publish@release/v1
8385
```

Diff for: docs/setup.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,9 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
186186
- name: Build wheels
187187
run: pipx run cibuildwheel==2.16.2
188188

189-
- uses: actions/upload-artifact@v3
189+
- uses: actions/upload-artifact@v4
190190
with:
191+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
191192
path: ./wheelhouse/*.whl
192193
```
193194

@@ -224,8 +225,9 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
224225
- name: Build wheels
225226
run: python -m cibuildwheel --output-dir wheelhouse
226227

227-
- uses: actions/upload-artifact@v3
228+
- uses: actions/upload-artifact@v4
228229
with:
230+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
229231
path: ./wheelhouse/*.whl
230232
```
231233

Diff for: examples/github-apple-silicon.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
env:
1515
CIBW_ARCHS_MACOS: x86_64 arm64
1616

17-
- uses: actions/upload-artifact@v3
17+
- uses: actions/upload-artifact@v4
1818
with:
19+
name: cibw-wheels-macos
1920
path: ./wheelhouse/*.whl

Diff for: examples/github-deploy.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ jobs:
2424
- name: Build wheels
2525
uses: pypa/[email protected]
2626

27-
- uses: actions/upload-artifact@v3
27+
- uses: actions/upload-artifact@v4
2828
with:
29+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
2930
path: ./wheelhouse/*.whl
3031

3132
build_sdist:
@@ -37,8 +38,9 @@ jobs:
3738
- name: Build sdist
3839
run: pipx run build --sdist
3940

40-
- uses: actions/upload-artifact@v3
41+
- uses: actions/upload-artifact@v4
4142
with:
43+
name: cibw-sdist
4244
path: dist/*.tar.gz
4345

4446
upload_pypi:
@@ -51,12 +53,12 @@ jobs:
5153
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
5254
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
5355
steps:
54-
- uses: actions/download-artifact@v3
56+
- uses: actions/download-artifact@v4
5557
with:
56-
# unpacks default artifact into dist/
57-
# if `name: artifact` is omitted, the action will create extra parent dir
58-
name: artifact
58+
# unpacks all CIBW artifacts into dist/
59+
pattern: cibw-*
5960
path: dist
61+
merge-multiple: true
6062

6163
- uses: pypa/gh-action-pypi-publish@release/v1
6264
with:

Diff for: examples/github-minimal.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
# output-dir: wheelhouse
2424
# config-file: "{package}/pyproject.toml"
2525

26-
- uses: actions/upload-artifact@v3
26+
- uses: actions/upload-artifact@v4
2727
with:
28+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
2829
path: ./wheelhouse/*.whl

Diff for: examples/github-with-qemu.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
# emulated ones
2727
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
2828

29-
- uses: actions/upload-artifact@v3
29+
- uses: actions/upload-artifact@v4
3030
with:
31+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
3132
path: ./wheelhouse/*.whl

0 commit comments

Comments
 (0)