Skip to content

Commit 0b71da4

Browse files
committed
Update release workflow
1 parent f0f7d79 commit 0b71da4

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,26 @@ defaults:
1212
shell: bash
1313

1414
jobs:
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
35-
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
37+
run: uv publish

0 commit comments

Comments
 (0)