Skip to content

Commit 88e2bb4

Browse files
committed
Add release pipeline
1 parent 4e2f750 commit 88e2bb4

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release wheel on PyPI
2+
3+
jobs:
4+
pypi-publish:
5+
name: upload release to PyPI
6+
runs-on: ubuntu-22.04
7+
8+
# Only run manually
9+
on: workflow_dispatch
10+
11+
# Specifying a GitHub environment is optional, but strongly encouraged
12+
environment: pypi
13+
14+
permissions:
15+
# IMPORTANT: this permission is mandatory for Trusted Publishing
16+
id-token: write
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
persist-credentials: false
22+
23+
- name: Install the latest version of uv
24+
uses: astral-sh/setup-uv@v6
25+
with:
26+
version: "latest"
27+
python-version: 3.13
28+
enable-cache: true
29+
30+
- name: Install dependencies with uv
31+
run: uv sync
32+
33+
- name: Run unit tests with uv
34+
run: |
35+
mkdir -p reports/pytest-uv
36+
uv run pytest -W error -v tests/ --durations=10 --junitxml=reports/pytest-uv/py3.xml
37+
38+
- name: Build wheel file
39+
run: uv build
40+
41+
- name: Publish package distributions to PyPI
42+
run: uv publish --trusted-publishing=always

0 commit comments

Comments
 (0)