This repository has been archived by the owner on May 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
99 lines (82 loc) · 2.2 KB
/
release.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
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
on:
push:
tags:
- 'v*'
name: release
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: ${{ contains(github.ref, 'pre') || contains(github.ref, 'rc') }}
linux-wheels:
name: build linux wheels for PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: deps
run: python -m pip install auditwheel
- name: build linux wheels
run: make manylinux
- name: fixup wheels
run: |
# NOTE(ww): --plat here MUST be kept up to date with the Makefile.
for whl in dist/*.whl; do
auditwheel repair "${whl}" --plat manylinux_2_28_x86_64 -w wheel/
done
- uses: actions/upload-artifact@v4
with:
name: wheels
path: wheel/*.whl
macos-wheels:
strategy:
matrix:
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
name: build macOS wheels for PyPI
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: build xed
run: ./scripts/bootstrap.sh
- name: deps
run: pip install wheel
- name: build wheel
run: pip wheel . -w wheel/
- uses: actions/upload-artifact@v4
with:
name: wheels
path: wheel/*.whl
publish-wheels:
name: upload built wheels
runs-on: ubuntu-latest
needs: [linux-wheels, macos-wheels]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: wheels
path: wheel/
- name: publish
uses: pypa/gh-action-pypi-publish@v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: wheel/