Skip to content

Commit da2bcc3

Browse files
committed
Publish on tag versions to real pypi
1 parent c11acf3 commit da2bcc3

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
tags:
66
- '[0-9]+.[0-9]+.[0-9]+*'
7-
branches:
8-
- vv-fix
97
workflow_dispatch:
108

119
jobs:
@@ -22,7 +20,7 @@ jobs:
2220
# Used for the ARM builds.
2321
- macos-14
2422
- windows-latest
25-
python-version: ['3.9']
23+
python-version: ['3.9', '3.10', '3.11', '3.12']
2624
steps:
2725
- uses: actions/checkout@v4
2826
- uses: actions/setup-python@v5
@@ -38,7 +36,12 @@ jobs:
3836
- name: Validate release tag
3937
id: release
4038
run: |
41-
echo "version=0.1.0" >> "${GITHUB_OUTPUT}"
39+
TAG="${GITHUB_REF_NAME}"
40+
if [[ ! "${TAG}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
41+
echo "::error::Tag '${TAG}' does not match the expected x.y.z pattern."
42+
exit 1
43+
fi
44+
echo "version=${TAG}" >> "${GITHUB_OUTPUT}"
4245
4346
- name: Update Python project version
4447
env:
@@ -63,4 +66,4 @@ jobs:
6366
rm rust/target/wheels/*-linux_*
6467
fi
6568
ls -l rust/target/wheels/
66-
twine upload -r testpypi -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} rust/target/wheels/*
69+
twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} rust/target/wheels/*

0 commit comments

Comments
 (0)