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
This commit is contained in:
Adam Lugowski
2023-12-20 17:32:28 -05:00
committed by GitHub
parent 6e2f4c00ab
commit 2c4974286f
6 changed files with 23 additions and 14 deletions
+8 -6
View File
@@ -24,8 +24,9 @@ jobs:
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
@@ -37,8 +38,9 @@ jobs:
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_pypi:
@@ -51,12 +53,12 @@ jobs:
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with: