Skip to content

Commit 52c704b

Browse files
committed
add publish workflow
1 parent 2d8bb63 commit 52c704b

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
run:
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: pypi
13+
permissions:
14+
id-token: write
15+
contents: read
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v6
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v7
21+
- name: Set up Python
22+
uses: actions/setup-python@v6
23+
with:
24+
python-version-file: "pyproject.toml"
25+
- name: Build
26+
run: uv build
27+
# Check that basic features work and we didn't miss to include crucial files
28+
- name: Smoke test (wheel)
29+
run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
30+
- name: Smoke test (source distribution)
31+
run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
32+
- name: Publish
33+
run: uv publish

0 commit comments

Comments
 (0)