-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (94 loc) · 3.19 KB
/
wheels.yml
File metadata and controls
113 lines (94 loc) · 3.19 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Build & Publish Wheels
on:
push:
tags: [ "v*" ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ---------------------------------------------------------------------------
# Build wheels (Linux / macOS / Windows) via cibuildwheel
# ---------------------------------------------------------------------------
build-wheels:
name: Wheels (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, macos-14, windows-2022 ]
steps:
- uses: actions/checkout@v6
- name: Set up QEMU (Linux aarch64 cross-compile)
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v4
with:
platforms: arm64
- name: Build wheels
uses: pypa/cibuildwheel@v2
env:
CIBW_BUILD_VERBOSITY: 1
SIGNET_COMMERCIAL_LICENSE_KEY: ${{ secrets.SIGNET_FORGE_COMMERCIAL_LICENSE_KEY }}
CIBW_ENVIRONMENT_PASS_LINUX: SIGNET_COMMERCIAL_LICENSE_KEY
- name: Upload wheel artifacts
uses: actions/upload-artifact@v7
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
# ---------------------------------------------------------------------------
# Build source distribution
# ---------------------------------------------------------------------------
build-sdist:
name: Source Distribution
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install build
run: pip install build
- name: Build sdist
run: python -m build --sdist
- name: Upload sdist artifact
uses: actions/upload-artifact@v7
with:
name: sdist
path: dist/*.tar.gz
# ---------------------------------------------------------------------------
# Publish to TestPyPI (tag push only, manual approval)
# ---------------------------------------------------------------------------
publish-testpypi:
name: Publish → TestPyPI
needs: [ build-wheels, build-sdist ]
runs-on: ubuntu-24.04
if: startsWith(github.ref, 'refs/tags/v')
environment: testpypi
permissions:
id-token: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: dist
merge-multiple: true
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
# ---------------------------------------------------------------------------
# Publish to PyPI (tag push only, after TestPyPI, manual approval)
# ---------------------------------------------------------------------------
publish-pypi:
name: Publish → PyPI
needs: [ publish-testpypi ]
runs-on: ubuntu-24.04
if: startsWith(github.ref, 'refs/tags/v')
environment: pypi
permissions:
id-token: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v8
with:
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1