Skip to content

Commit 434eb48

Browse files
committed
fix wf
1 parent f6ead09 commit 434eb48

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@ name: Test and Publish to PyPI
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: 'Tag to release (must start with v*)'
8+
required: true
59

610
jobs:
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

0 commit comments

Comments
 (0)