Skip to content

Commit 6a11151

Browse files
fix: publish ci on tag
1 parent 5077748 commit 6a11151

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/pypi-publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
name: Publish to PyPI
55

66
on:
7-
# Deploy to Pypi when a release is published
7+
# Deploy to PyPI when a tag is pushed or a release is published
8+
push:
9+
tags:
10+
- 'v*'
811
release:
912
types: [published]
1013

@@ -18,14 +21,12 @@ jobs:
1821
- name: Export tag
1922
id: vars
2023
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
21-
if: ${{ github.event_name == 'release' }}
2224

2325
- name: Update project version
2426
run: |
2527
sed -i "s/^version = \".*\"/version = \"$RELEASE_VERSION\"/" pyproject.toml
2628
env:
2729
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
28-
if: ${{ github.event_name == 'release' }}
2930

3031
- name: Upload updated pyproject.toml
3132
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)