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:
@@ -56,8 +56,9 @@ well as several useful actions. Alongside your existing job(s) that runs cibuild
|
|||||||
- name: Build SDist
|
- name: Build SDist
|
||||||
run: pipx run build --sdist
|
run: pipx run build --sdist
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: cibw-sdist
|
||||||
path: dist/*.tar.gz
|
path: dist/*.tar.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -74,10 +75,11 @@ This requires setting this GitHub workflow in your project's PyPI settings (for
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'release' && github.event.action == 'published'
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: artifact
|
pattern: cibw-*
|
||||||
path: dist
|
path: dist
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
```
|
```
|
||||||
|
|||||||
+4
-2
@@ -186,8 +186,9 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
|
|||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
run: pipx run cibuildwheel==2.16.2
|
run: pipx run cibuildwheel==2.16.2
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -224,8 +225,9 @@ To build Linux, Mac, and Windows wheels using GitHub Actions, create a `.github/
|
|||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
run: python -m cibuildwheel --output-dir wheelhouse
|
run: python -m cibuildwheel --output-dir wheelhouse
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CIBW_ARCHS_MACOS: x86_64 arm64
|
CIBW_ARCHS_MACOS: x86_64 arm64
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: cibw-wheels-macos
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ jobs:
|
|||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: pypa/cibuildwheel@v2.16.2
|
uses: pypa/cibuildwheel@v2.16.2
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|
||||||
build_sdist:
|
build_sdist:
|
||||||
@@ -37,8 +38,9 @@ jobs:
|
|||||||
- name: Build sdist
|
- name: Build sdist
|
||||||
run: pipx run build --sdist
|
run: pipx run build --sdist
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: cibw-sdist
|
||||||
path: dist/*.tar.gz
|
path: dist/*.tar.gz
|
||||||
|
|
||||||
upload_pypi:
|
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)
|
# 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')
|
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
# unpacks default artifact into dist/
|
# unpacks all CIBW artifacts into dist/
|
||||||
# if `name: artifact` is omitted, the action will create extra parent dir
|
pattern: cibw-*
|
||||||
name: artifact
|
|
||||||
path: dist
|
path: dist
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ jobs:
|
|||||||
# output-dir: wheelhouse
|
# output-dir: wheelhouse
|
||||||
# config-file: "{package}/pyproject.toml"
|
# config-file: "{package}/pyproject.toml"
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ jobs:
|
|||||||
# emulated ones
|
# emulated ones
|
||||||
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
|
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|||||||
Reference in New Issue
Block a user