Skip to content

Commit 05cd87f

Browse files
committed
Allow building wheels automatically on release
1 parent 5e9b8b8 commit 05cd87f

File tree

2 files changed

+49
-5
lines changed

2 files changed

+49
-5
lines changed

.github/workflows/release.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
deploy:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-13]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.x'
24+
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install build cibuildwheel==2.20.0
29+
30+
- name: Build package
31+
run: python -m cibuildwheel
32+
33+
- name: Publish package
34+
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
35+
with:
36+
user: __token__
37+
password: ${{ secrets.PYPI_API_TOKEN }}
38+
packages_dir: ./wheelhouse/

pyproject.toml

+11-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "scikit_build_core.build"
66

77
[project]
88
name = "panda3d-interrogate"
9-
version = "0.0.1"
9+
version = "0.1.0"
1010
description = "Binding generator designed for Panda3D"
1111
readme = "README.md"
1212
requires-python = ">=3.2"
@@ -44,14 +44,20 @@ build = "cp38-*"
4444
[tool.cibuildwheel.linux]
4545
repair-wheel-command = [
4646
"auditwheel repair -w {dest_dir} {wheel}",
47-
"pipx run abi3audit --strict --report {wheel}",
47+
"pip install -U abi3audit",
48+
"abi3audit --strict --report {wheel}",
4849
]
4950

5051
[tool.cibuildwheel.macos]
52+
archs = ["universal2"]
5153
repair-wheel-command = [
52-
"delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}",
53-
"pipx run abi3audit --strict --report {wheel}",
54+
"cp {wheel} {dest_dir}",
55+
"pip install -U abi3audit",
56+
"abi3audit --strict --report {wheel}",
5457
]
5558

5659
[tool.cibuildwheel.windows]
57-
repair-wheel-command = "pipx run abi3audit --strict --report {wheel}"
60+
repair-wheel-command = [
61+
"pip install -U abi3audit",
62+
"pipx run abi3audit --strict --report {wheel}",
63+
]

0 commit comments

Comments
 (0)