Skip to content

Commit 90eadb8

Browse files
committed
automatically publish when git tag is pushed
1 parent 97d9e62 commit 90eadb8

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/publish.yml

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

0 commit comments

Comments
 (0)