File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 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
22
33on :
44 workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : ' Tag to release (must start with v*)'
8+ required : true
59
610jobs :
711 test :
8- if : startsWith(github.ref, 'refs/tags/v')
912 runs-on : ubuntu-latest
1013
1114 steps :
1215 - name : Checkout code
1316 uses : actions/checkout@v4
17+ with :
18+ ref : ${{ github.event.inputs.tag }}
1419
1520 - name : Set up Python
1621 uses : actions/setup-python@v5
1722 with :
18- python-version : ' 3.12 '
23+ python-version : ' 3.11 '
1924
2025 - name : Install Poetry and dependencies
2126 run : |
@@ -27,13 +32,14 @@ jobs:
2732 run : poetry run pytest
2833
2934 publish :
30- if : startsWith(github.ref, 'refs/heads/v')
3135 needs : test
3236 runs-on : ubuntu-latest
3337
3438 steps :
3539 - name : Checkout code
3640 uses : actions/checkout@v4
41+ with :
42+ ref : ${{ github.event.inputs.tag }}
3743
3844 - name : Set up Python
3945 uses : actions/setup-python@v5
You can’t perform that action at this time.
0 commit comments