forked from nav-io/libblsct-bindings
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.4 KB
/
python-publish-pkg.yml
File metadata and controls
53 lines (43 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: 'Python: Publish package'
on:
workflow_dispatch:
jobs:
python-public-package:
strategy:
matrix:
os: ["ubuntu-24.04", "macos-15"]
python-version: ["3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
clean: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: pip install cibuildwheel twine
- name: Install system dependencies
run: |
if [[ $RUNNER_OS == 'Linux' ]]; then
sudo apt-get update && sudo apt-get install -y swig autoconf automake libtool pkg-config
elif [[ $RUNNER_OS == 'macOS' ]]; then
brew install swig autoconf automake libtool pkg-config
fi
- name: Build wheels with cibuildwheel
run: |
cd ffi/python
if [ "${{ matrix.python-version }}" = "3.12" ]; then
export CIBW_BUILD="cp312-*"
elif [ "${{ matrix.python-version }}" = "3.13" ]; then
export CIBW_BUILD="cp313-*"
fi
cibuildwheel --output-dir wheelhouse
- name: Upload to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
cd ffi/python
twine upload wheelhouse/*.whl