Skip to content

Commit 8461a89

Browse files
committed
Add release workflow
1 parent 662abbf commit 8461a89

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/release.yml

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

0 commit comments

Comments
 (0)