File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,20 +2,25 @@ name: Test and Publish to PyPI
2
2
3
3
on :
4
4
workflow_dispatch :
5
+ inputs :
6
+ tag :
7
+ description : ' Tag to release (must start with v*)'
8
+ required : true
5
9
6
10
jobs :
7
11
test :
8
- if : startsWith(github.ref, 'refs/tags/v')
9
12
runs-on : ubuntu-latest
10
13
11
14
steps :
12
15
- name : Checkout code
13
16
uses : actions/checkout@v4
17
+ with :
18
+ ref : ${{ github.event.inputs.tag }}
14
19
15
20
- name : Set up Python
16
21
uses : actions/setup-python@v5
17
22
with :
18
- python-version : ' 3.12 '
23
+ python-version : ' 3.11 '
19
24
20
25
- name : Install Poetry and dependencies
21
26
run : |
@@ -27,13 +32,14 @@ jobs:
27
32
run : poetry run pytest
28
33
29
34
publish :
30
- if : startsWith(github.ref, 'refs/heads/v')
31
35
needs : test
32
36
runs-on : ubuntu-latest
33
37
34
38
steps :
35
39
- name : Checkout code
36
40
uses : actions/checkout@v4
41
+ with :
42
+ ref : ${{ github.event.inputs.tag }}
37
43
38
44
- name : Set up Python
39
45
uses : actions/setup-python@v5
You can’t perform that action at this time.
0 commit comments