-
Notifications
You must be signed in to change notification settings - Fork 78
108 lines (87 loc) · 2.87 KB
/
publish-to-test.yaml
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
name: Publish Python 🐍 distribution 📦 to TestPyPI
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+' # only run on alpha tags
jobs:
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
build_wheels-manylinux:
name: Build wheels on ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_ALL_LINUX: >
yum update &&
yum install -y gmp-devel
CIBW_BUILD: cp39-manylinux* cp310-manylinux* cp311-manylinux* cp312-manylinux* cp313-manylinux*
CIBW_ENVIRONMENT_LINUX: CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-manylinux
path: ./wheelhouse/*.whl
# macos-13 is an intel runner
build_wheels-macos-13:
name: Build wheels on macos-13
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-*
CIBW_ENVIRONMENT_MACOS: CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib"
MACOSX_DEPLOYMENT_TARGET: 13.0
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-macos-13
path: ./wheelhouse/*.whl
# macos-14 is apple silicon
build_wheels-macos-14:
name: Build wheels on macos-14
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-*
CIBW_ENVIRONMENT_MACOS: CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib"
MACOSX_DEPLOYMENT_TARGET: 14.0
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-macos-14
path: ./wheelhouse/*.whl
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs: [make_sdist, build_wheels-manylinux, build_wheels-macos-13, build_wheels-macos-14]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/fastecdsa
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist/
merge-multiple: true
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
repository-url: https://test.pypi.org/legacy/