Skip to content

Commit ff361f5

Browse files
authored
Update python-publish.yml
1 parent 9f85564 commit ff361f5

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
name: Tests
2-
on: [push, pull_request]
1+
name: Upload Python Package
2+
on:
3+
release:
4+
types: [published]
35
jobs:
4-
tests:
6+
deploy:
57
runs-on: ubuntu-latest
6-
strategy:
7-
fail-fast: false
8-
matrix:
9-
python-version: ["3.10", "3.11", "3.12", "3.13"]
108
steps:
119
- uses: actions/checkout@v4
1210
- name: Install uv
1311
uses: astral-sh/setup-uv@v3
14-
- name: Set up Python ${{ matrix.python-version }}
15-
run: uv python install ${{ matrix.python-version }}
16-
- name: Install dependencies
17-
run: uv sync --extra test --python ${{ matrix.python-version }}
18-
- name: Run pytest
19-
run: uv run --python ${{ matrix.python-version }} pytest -v
12+
- name: Set up Python
13+
run: uv python install 3.12
14+
- name: Build and publish
15+
env:
16+
TWINE_USERNAME: __token__
17+
TWINE_PASSWORD: ${{ secrets.TOKEN }}
18+
run: |
19+
uv build
20+
uv run --with twine twine upload dist/*

0 commit comments

Comments
 (0)