Skip to content

Commit efa805c

Browse files
committed
fix: workflow triggers on tag push, not manual
1 parent f3ed373 commit efa805c

File tree

1 file changed

+6
-33
lines changed

1 file changed

+6
-33
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,23 @@
1-
name: Bump Version and Publish to PyPI
1+
name: Publish to PyPI
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
bump_type:
7-
description: 'Version bump type'
8-
required: true
9-
default: 'patch'
10-
type: choice
11-
options:
12-
- patch
13-
- minor
14-
- major
4+
push:
5+
tags:
6+
- 'v*'
157

168
jobs:
17-
bump-and-release:
18-
name: Bump Version and Publish to PyPI
9+
release:
10+
name: Publish to PyPI
1911
runs-on: ubuntu-latest
2012
environment: pypi
2113
permissions:
2214
id-token: write
23-
contents: write
2415
steps:
2516
- uses: actions/checkout@v4
26-
with:
27-
token: ${{ secrets.GITHUB_TOKEN }}
2817

2918
- name: Install uv and setup Python
3019
uses: astral-sh/setup-uv@v3
3120

32-
- name: Bump version
33-
run: |
34-
uv version --bump ${{ inputs.bump_type }}
35-
NEW_VERSION=$(uv version --short)
36-
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
37-
38-
- name: Commit version bump
39-
run: |
40-
git config --local user.email "action@github.com"
41-
git config --local user.name "GitHub Action"
42-
git add pyproject.toml uv.lock
43-
git commit -m "Bump version to ${{ env.NEW_VERSION }}"
44-
git tag "v${{ env.NEW_VERSION }}"
45-
git push origin master
46-
git push origin "v${{ env.NEW_VERSION }}"
47-
4821
- name: Build package
4922
run: uv build
5023

0 commit comments

Comments
 (0)