Skip to content

Commit

Permalink
run publish workflow only on tags
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaykarle committed Oct 14, 2024
1 parent 62ac4c5 commit c8e73d3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ on:
workflow_run:
workflows: [Build]
types: [completed]
push:
tags:
- v**

jobs:
publish-pypi:
name: Publish to PyPI
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
Expand Down

0 comments on commit c8e73d3

Please sign in to comment.