Skip to content

Commit

Permalink
Bump to actions/{upload,download}-artifact to v4
Browse files Browse the repository at this point in the history
This update requires artifacts to be uniquely named, so to make things
easier for the last step we introduce a new intermediate merge step as
per the action's documentation.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
  • Loading branch information
rtobar committed Jun 7, 2024
1 parent 2f5544d commit fa14048
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/deploy-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ jobs:
CIBW_TEST_COMMAND: "bash -c 'cd \"{project}\"; pytest -vv'"
CIBW_TEST_REQUIRES: pytest cffi

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.arch }}
path: ./wheelhouse/*.whl

build_sdist:
Expand All @@ -106,18 +107,28 @@ jobs:
- name: Build sdist
run: python setup.py sdist

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: source-dist
path: dist/*.tar.gz

merge_artifacts:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: all-artifacts

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
name: all-artifacts
path: dist

- uses: pypa/gh-action-pypi-publish@master
Expand Down

0 comments on commit fa14048

Please sign in to comment.