File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 release :
88 types :
99 - " published"
10+ env :
11+ TARGET_INDEX : ${{ !contains(github.ref_name, 'test') && startsWith(github.ref_name, 'v') && 'pypi' || 'testpypi' }}
1012
1113jobs :
1214 pypi :
1315 name : Publish to PyPI
1416 runs-on : ubuntu-latest
1517 environment :
16- name : ${{ !contains(github.ref_name, 'test') && startsWith(github.ref_name, 'v') && 'pypi' || 'testpypi' }}
18+ name : ${{ env.TARGET_INDEX }}
1719 permissions :
1820 id-token : write
1921 steps :
2426 run : uv run --isolated --no-project -p 3.13 --with dist/*.whl --with pytest pytest tests/test_base.py
2527 - name : Smoke test (source distribution)
2628 run : uv run --isolated --no-project -p 3.13 --with dist/*.tar.gz --with pytest pytest tests/test_base.py
27- - run : uv publish --trusted-publishing always ${{ !contains(github.ref_name, 'test') && startsWith(github.ref_name, 'v ') && '' || '--index testpypi' }}
29+ - run : uv publish --trusted-publishing always ${{ env.TARGET_INDEX == 'testpypi ') && '--index testpypi' }}
You can’t perform that action at this time.
0 commit comments