-
-
Notifications
You must be signed in to change notification settings - Fork 23
73 lines (62 loc) · 1.7 KB
/
wheel.yml
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
63
64
65
66
67
68
69
70
71
72
73
name: Wheel
on:
push:
branches:
- main
tags:
- '*'
workflow_dispatch:
permissions: read-all
jobs:
build_wheels:
name: Build Wheel (${{ matrix.python-tag }}-${{ matrix.platform }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-22.04, windows-2019 ]
python-tag: [ "cp39", "cp310", "cp311", "cp312", "cp313" ]
include:
- os: ubuntu-22.04
platform: manylinux_x86_64
- os: windows-2019
platform: win_amd64
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up MSVC (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86_64
- name: Set up CMake and Ninja
uses: lukka/get-cmake@latest
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python-tag }}-${{ matrix.platform }}
CIBW_BUILD_VERBOSITY: 1
- uses: actions/upload-artifact@v4
with:
name: endstone-wheels-${{ matrix.python-tag }}-${{ matrix.platform }}
path: ./wheelhouse/*.whl
publish:
name: Publish Wheels to PyPI
if: contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [ build_wheels ]
environment: pypi
permissions:
id-token: write
contents: write
steps:
- name: Restore Artifacts
uses: actions/download-artifact@v4
with:
pattern: endstone-wheels-*
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1