-
-
Notifications
You must be signed in to change notification settings - Fork 171
62 lines (53 loc) · 1.87 KB
/
publish_wheels.yml
File metadata and controls
62 lines (53 loc) · 1.87 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
53
54
55
56
57
58
59
60
61
62
name: Build and Publish
on:
workflow_dispatch:
jobs:
publish:
runs-on: ${{ matrix.target[0] }}
strategy:
fail-fast: false
matrix:
target:
- [ubuntu-latest, manylinux_x86_64, ""]
- [windows-latest, win_amd64, ""]
- [macos-13, macosx_x86_64, "13.0"]
- [macos-14, macosx_arm64, "14.0"]
python:
- cp39
- cp310
- cp311
- cp312
- cp313
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Setup msbuild
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2
if: matrix.target[0] == 'windows-latest'
- name: Build wheels using cibuildwheel
uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.target[2] }}
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.target[1] }}
CIBW_BUILD_VERBOSITY: 1
with:
package-dir: .
output-dir: wheelhouse
- name: Upload Artifacts
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: TenSEAL-${{ matrix.python }}-${{ matrix.target[0] }}
path: ./wheelhouse/*.whl
- name: Set up Python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.13"
- name: Install twine
run: python -m pip install --upgrade twine
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload --repository pypi --skip-existing --verbose wheelhouse/*.whl