Skip to content

Commit e88c70f

Browse files
committed
python: Build python wrapper wheels with github actions
1 parent 48bbd3e commit e88c70f

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/wheels.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: wheels
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
id-token: write
11+
12+
jobs:
13+
build:
14+
strategy:
15+
matrix:
16+
os: [macos13, macos-latest]
17+
# os: [ubuntu-latest, macos13, macos-latest]
18+
19+
runs-on: ${{ matrix.os }}
20+
environment:
21+
name: pypi
22+
url: https://pypi.org/p/pylc3
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.10'
28+
cache: 'pip'
29+
- if: ${{ matrix.os == 'ubuntu-latest' }}
30+
run: |
31+
pip install auditwheel patchelf
32+
pip wheel . -w wheel
33+
auditwheel repair -w dist --plat=manylinux_2_17_x86_64 wheel/*.whl
34+
- if: ${{ matrix.os == 'macos13' || matrix.os == 'macos-latest' }}
35+
run: |
36+
pip wheel . -w dist
37+
- uses: actions/upload-artifact@v4
38+
with:
39+
name: python-package-distributions
40+
path: dist/
41+
42+
publish:
43+
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- uses: actions/download-artifact@v4
48+
with:
49+
name: python-package-distributions
50+
path: dist/
51+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)