File tree Expand file tree Collapse file tree 1 file changed +18
-20
lines changed
Expand file tree Collapse file tree 1 file changed +18
-20
lines changed Original file line number Diff line number Diff line change @@ -12,30 +12,28 @@ defaults:
1212 shell : bash
1313
1414jobs :
15- test :
15+ pypi :
1616 name : Publish to PyPI
1717 runs-on : ubuntu-latest
18+ # Environment and permissions trusted publishing.
19+ environment :
20+ # Create this environment in the GitHub repository under Settings -> Environments
21+ name : pypi
22+ permissions :
23+ id-token : write
24+ contents : read
1825 steps :
19- - uses : actions/checkout@v4
20- - uses : actions/setup-python@v5
21- with :
22- python-version : ${{ matrix.python }}
23- cache : " pip"
24- cache-dependency-path : setup.py
25-
26+ - name : Checkout
27+ uses : actions/checkout@v5
28+ - name : Install uv
29+ uses : astral-sh/setup-uv@v6
2630 - name : Install dependencies
27- run : |
28- pip install -e .[dev]
29-
31+ run : uv sync --locked
3032 - name : Test
31- run : |
32- python -m pytest
33-
33+ run : uv run pytest
34+ - name : Build
35+ run : uv build
3436 - name : Publish
37+ run : uv publish
3538 env :
36- TWINE_NON_INTERACTIVE : true
37- TWINE_USERNAME : " __token__"
38- TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD }}
39- run : |
40- python setup.py sdist bdist_wheel
41- twine upload dist/* --skip-existing
39+ UV_PUBLISH_TOKEN : ${{ secrets.UV_PUBLISH_TOKEN }}
You can’t perform that action at this time.
0 commit comments