Skip to content

Commit 982753d

Browse files
committed
add publish workflow
1 parent 6a03b69 commit 982753d

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

‎.github/workflows/publish.yml‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
with:
21+
submodules: recursive
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: Install build dependencies
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y autoconf automake libtool m4 build-essential
30+
- name: Install Python dependencies
31+
run: |
32+
export PATH="$HOME/.cargo/bin:$PATH"
33+
uv venv
34+
source .venv/bin/activate
35+
uv pip install cython setuptools
36+
- name: Build
37+
run: make build
38+
# Check that basic features work and we didn't miss to include crucial files
39+
- name: Smoke test (wheel)
40+
run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
41+
- name: Smoke test (source distribution)
42+
run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
43+
- name: Publish
44+
run: uv publish

0 commit comments

Comments
 (0)