Skip to content

Commit

Permalink
CI Update Github upload/download artifact action (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjpfan authored Sep 15, 2024
1 parent 4b7490c commit 441330e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]

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

build_sdist:
Expand All @@ -40,8 +41,9 @@ jobs:
- name: Build sdist
run: pipx run build --sdist

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

upload_pypi:
Expand All @@ -52,15 +54,17 @@ jobs:
# alternatively, to publish when a GitHub Release is created, use the following rule:
if: github.event_name == 'release' && github.event.action == 'published'
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
pattern: artifact-*
path: dist
merge-multiple: true

- name: Check dist
run: ls dist

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# To test: repository_url: https://test.pypi.org/legacy/
To test: repository_url: https://test.pypi.org/legacy/

0 comments on commit 441330e

Please sign in to comment.