@@ -3,7 +3,7 @@ name: Python wheels
33on :
44 push :
55 branches : [main]
6- tags : ["py-v*", "py-test-*" ]
6+ tags : ["py-v*"]
77 pull_request :
88 branches : [main]
99 workflow_dispatch : # manual ad-hoc builds from any branch
6363 run : |
6464 tag="${GITHUB_REF#refs/tags/}"
6565 version="${tag#py-v}"
66- version="${version#py-test-}"
6766 cargo_version=$(grep -m1 '^version' bonsai-py/Cargo.toml | sed -E 's/.*"([^"]+)".*/\1/')
6867 if [ "$version" != "$cargo_version" ]; then
6968 echo "::error::Tag version '$version' does not match Cargo.toml version '$cargo_version'."
@@ -149,12 +148,12 @@ jobs:
149148 python -c "import bonsai_bt; print(bonsai_bt.__version__)"
150149
151150 publish :
152- name : Publish to PyPI / TestPyPI
151+ name : Publish to PyPI
153152 needs : [build, sdist, verify-sdist]
154- if : startsWith(github.ref, 'refs/tags/py-v') || startsWith(github.ref, 'refs/tags/py-test-')
153+ if : startsWith(github.ref, 'refs/tags/py-v')
155154 runs-on : ubuntu-latest
156155 environment :
157- name : ${{ startsWith(github.ref, 'refs/tags/py-test-') && 'testpypi' || ' pypi' }}
156+ name : pypi
158157 permissions :
159158 id-token : write # OIDC for Trusted Publishing
160159 steps :
@@ -174,7 +173,5 @@ jobs:
174173
175174 - uses : pypa/gh-action-pypi-publish@release/v1
176175 with :
177- repository-url : >-
178- ${{ startsWith(github.ref, 'refs/tags/py-test-') && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}
179176 packages-dir : dist
180177 skip-existing : true
0 commit comments