Skip to content

Commit f5cc08f

Browse files
a-faclaude
andcommitted
Add PyPI publish workflow and cibuildwheel config
Adds a GitHub Actions workflow triggered on v* tags that builds platform wheels (via cibuildwheel) and sdist, then publishes to PyPI using Trusted Publisher (OIDC). Adds [tool.cibuildwheel] config targeting CPython 3.10–3.13, skipping musllinux. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent de03dfc commit f5cc08f

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build-wheels:
10+
name: Build wheels on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, macos-latest, windows-latest]
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: pypa/cibuildwheel@v2.22
19+
env:
20+
CIBW_BUILD_VERBOSITY: 1
21+
22+
- uses: actions/upload-artifact@v4
23+
with:
24+
name: wheels-${{ matrix.os }}
25+
path: ./wheelhouse/*.whl
26+
27+
build-sdist:
28+
name: Build source distribution
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: "3.12"
36+
37+
- name: Build sdist
38+
run: |
39+
pip install build
40+
python -m build --sdist
41+
42+
- uses: actions/upload-artifact@v4
43+
with:
44+
name: sdist
45+
path: dist/*.tar.gz
46+
47+
publish:
48+
name: Publish to PyPI
49+
needs: [build-wheels, build-sdist]
50+
runs-on: ubuntu-latest
51+
environment: release
52+
permissions:
53+
id-token: write
54+
steps:
55+
- uses: actions/download-artifact@v4
56+
with:
57+
path: dist
58+
merge-multiple: true
59+
60+
- uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ panel = ["panel","bokeh-jupyter","ipympl","plotly","openpyxl"]
3030
[tool.setuptools.package-data]
3131
ionique = ["LLM_GUIDE.md", "llms.txt"]
3232

33+
[tool.cibuildwheel]
34+
build = "cp310-* cp311-* cp312-* cp313-*"
35+
skip = "*-musllinux_*"
36+
before-build = "pip install numpy Cython"
37+
3338
[tool.setuptools_scm]
3439
write_to = "src/ionique/_version.py"
3540
# fall back version is for downloading git repo

0 commit comments

Comments
 (0)