Skip to content

Commit

Permalink
Update publish-to-pypi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ZihengSun committed Sep 6, 2024
1 parent a5b6caf commit cc1a88f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
workflows: ["Run Tests"]
types:
- completed
push:
tags:
- 'v*.*.*' # Trigger the workflow for version tags like 'v1.0.0'
release:
types: [published] # Trigger the workflow when a release is published

jobs:
test-installation:
Expand Down Expand Up @@ -63,7 +68,6 @@ jobs:
run: echo ${{ github.ref }}

- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit cc1a88f

Please sign in to comment.