-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (74 loc) · 1.81 KB
/
release.yml
File metadata and controls
88 lines (74 loc) · 1.81 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
name: Build wheels
on:
push:
tags:
- "v*"
jobs:
lint_and_test:
uses: ./.github/workflows/tests.yml
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
needs:
- lint_and_test
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install hatch
run: pip install hatch
- name: Build sdist
run: hatch build -t sdist
- uses: actions/upload-artifact@v7
with:
name: sdist
path: ./dist/*.tar.gz
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs:
- lint_and_test
strategy:
matrix:
os:
- ubuntu-24.04
- ubuntu-24.04-arm
- windows-2025
- windows-11-arm
- macOS-26
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-python@v6
with:
python-version: "3.10 - 3.13"
- name: Install hatch
run: pip install hatch
- name: Build wheels
run: hatch run wheels:build dist
- uses: actions/upload-artifact@v7
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./dist/*.whl
publish_to_pypi:
name: Publish to PyPI
permissions:
id-token: write
runs-on: ubuntu-latest
needs:
- build_sdist
- build_wheels
steps:
- name: Download all the dists
uses: actions/download-artifact@v6
with:
path: dist/
merge-multiple: true
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1