Skip to content

Commit

Permalink
Fix artefact upload names
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Dec 15, 2024
1 parent 0bc5722 commit 19fd195
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/upload_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Build and upload to PyPI

on:
release:
types: [published]
types: [published, edited]
push:
# branches:
# - main

jobs:
build_wheels:
Expand All @@ -25,10 +28,11 @@ jobs:
# available yet which can cause the build to fail. Keep going, and upload
# the wheels for all of the previous versions when that happens.
continue-on-error: true
uses: pypa/cibuildwheel@v2.20.0
uses: pypa/cibuildwheel@v2.22.0

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_sdist:
Expand All @@ -50,17 +54,22 @@ jobs:

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

upload_pypi:
name: Upload to PyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
id-token: write
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down

0 comments on commit 19fd195

Please sign in to comment.