Skip to content

Commit

Permalink
Add pypi upload on tagged releases
Browse files Browse the repository at this point in the history
  • Loading branch information
dfangl committed Nov 19, 2024
1 parent eaa2a48 commit 5eb9202
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ jobs:
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
# permissions:
# id-token: write
environment:
name: pypi
url: https://pypi.org/p/jpype1-ext
permissions:
id-token: write
# 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')
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -76,4 +78,6 @@ jobs:
path: dist
merge-multiple: true
- name: List artifacts
run: ls -lah dist/
run: ls -lah dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 5eb9202

Please sign in to comment.