Skip to content

Commit

Permalink
publish to pypi on release
Browse files Browse the repository at this point in the history
  • Loading branch information
ASKabalan committed Oct 24, 2024
1 parent 9e2a24d commit ef16995
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/github-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
push:
branches:
- main
# release:
# types:
# - published
release:
types:
- published

jobs:
build_wheels:
Expand Down Expand Up @@ -52,9 +52,9 @@ jobs:
environment: pypi
permissions:
id-token: write
# if: github.event_name == 'release' && github.event.action == 'published'
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 @@ -66,3 +66,4 @@ jobs:
- uses: pypa/gh-action-pypi-publish@release/v1
#with:
# repository-url: https://test.pypi.org/legacy/

0 comments on commit ef16995

Please sign in to comment.