Skip to content

Commit 0559716

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

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/wheels.yaml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
18+
runs-on: ${{ matrix.os }}
19+
environment:
20+
name: pypi
21+
url: https://pypi.org/p/pylc3
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.10'
27+
cache: 'pip'
28+
- if: ${{ matrix.os == 'ubuntu-latest' }}
29+
run: |
30+
pip install auditwheel patchelf
31+
pip wheel . -w wheel
32+
auditwheel repair -w dist --plat=manylinux_2_17_x86_64 wheel/*.whl
33+
- if: ${{ matrix.os == 'macos13' || matrix.os == 'macos-latest' }}
34+
run: |
35+
pip wheel . -w dist
36+
- uses: actions/upload-artifact@v4
37+
with:
38+
name: python-package-distributions
39+
path: dist/
40+
41+
publish:
42+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/download-artifact@v4
46+
with:
47+
name: python-package-distributions
48+
path: dist/
49+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)