Skip to content

Commit 53c6393

Browse files
committed
auto run on tags
1 parent 434eb48 commit 53c6393

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/publish-to-pypi.yml

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: Test and Publish to PyPI
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
tag:
7-
description: 'Tag to release (must start with v*)'
8-
required: true
4+
push:
5+
tags:
6+
- 'v*' # triggers only when pushing tags starting with 'v'
97

108
jobs:
119
test:
@@ -14,13 +12,11 @@ jobs:
1412
steps:
1513
- name: Checkout code
1614
uses: actions/checkout@v4
17-
with:
18-
ref: ${{ github.event.inputs.tag }}
1915

2016
- name: Set up Python
2117
uses: actions/setup-python@v5
2218
with:
23-
python-version: '3.11'
19+
python-version: '3.12'
2420

2521
- name: Install Poetry and dependencies
2622
run: |
@@ -38,13 +34,11 @@ jobs:
3834
steps:
3935
- name: Checkout code
4036
uses: actions/checkout@v4
41-
with:
42-
ref: ${{ github.event.inputs.tag }}
4337

4438
- name: Set up Python
4539
uses: actions/setup-python@v5
4640
with:
47-
python-version: '3.11'
41+
python-version: '3.12'
4842

4943
- name: Install Poetry and dependencies
5044
run: |

0 commit comments

Comments
 (0)