Skip to content

Commit

Permalink
Add publish_pypi workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
honnibal committed Jul 25, 2024
1 parent 0384175 commit 54df852
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# The cibuildwheel action triggers on creation of a release, this
# triggers on publication.
# The expected workflow is to create a draft release and let the wheels
# upload, and then hit 'publish', which uploads to PyPi.

on:
release:
types:
- published

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/cymem
permissions:
id-token: write
contents: read
if: github.event_name == 'release' && github.event.action == 'published'
# 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')
steps:
- uses: robinraju/release-downloader@v1
with:
tag: {{ github.event.release.tag_name }}
fileName: '*'
out-file-path: 'dist'
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
#- uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 54df852

Please sign in to comment.