Skip to content

Commit

Permalink
Upgrade upload/download artifact actions to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
alugowski committed Dec 18, 2023
1 parent f3f9c68 commit bf17620
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ jobs:
# run tests in the {package}/tests dir which is python/tests
CIBW_TEST_COMMAND: "pytest {package}/tests"

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


Expand All @@ -123,27 +124,29 @@ jobs:
if: (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_dest != 'No Upload')

steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist

# Upload to PyPI
- uses: pypa/gh-action-pypi-publish@release/v1
name: Upload to PyPI
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_dest == 'PyPI')
with:
# PyPI does not allow replacing a file. Without this flag the entire action fails if even a single duplicate exists.
skip-existing: true
verbose: true
password: ${{ secrets.PYPI_API_TOKEN }}

# Upload to Test PyPI
- uses: pypa/gh-action-pypi-publish@release/v1
name: Upload to Test PyPI
if: github.event_name == 'workflow_dispatch' && github.event.inputs.upload_dest == 'Test PyPI'
with:
# PyPI does not allow replacing a file. Without this flag the entire action fails if even a single duplicate exists.
skip-existing: true
verbose: true
repository-url: https://test.pypi.org/legacy/
- name: Display structure of downloaded files
run: ls -R dist

# # Upload to PyPI
# - uses: pypa/gh-action-pypi-publish@release/v1
# name: Upload to PyPI
# if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.upload_dest == 'PyPI')
# with:
# # PyPI does not allow replacing a file. Without this flag the entire action fails if even a single duplicate exists.
# skip-existing: true
# verbose: true
# password: ${{ secrets.PYPI_API_TOKEN }}
#
# # Upload to Test PyPI
# - uses: pypa/gh-action-pypi-publish@release/v1
# name: Upload to Test PyPI
# if: github.event_name == 'workflow_dispatch' && github.event.inputs.upload_dest == 'Test PyPI'
# with:
# # PyPI does not allow replacing a file. Without this flag the entire action fails if even a single duplicate exists.
# skip-existing: true
# verbose: true
# repository-url: https://test.pypi.org/legacy/

0 comments on commit bf17620

Please sign in to comment.