-
Notifications
You must be signed in to change notification settings - Fork 8
133 lines (111 loc) · 3.77 KB
/
release.yml
File metadata and controls
133 lines (111 loc) · 3.77 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
on:
release:
types:
- published
name: release
permissions: {}
jobs:
release-linux:
name: build Linux release dists
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version-file: pyproject.toml
- name: build wheels
run: make dist-pyrage
- name: upload linux dists
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pyrage-dists-linux
path: dist/
release-linux-arm:
name: build Linux arm release dists
# Use 22.04, as 24.04 is unstable atm:
# https://github.com/orgs/community/discussions/148648#discussioncomment-11890717
runs-on: ubuntu-22.04-arm
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version-file: pyproject.toml
- name: build wheels
run: make dist-pyrage
- name: upload linux dists
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pyrage-dists-linux-arm
path: dist/
release-macos:
name: build macOS release dists
runs-on: macos-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version-file: pyproject.toml
- name: build wheels
run: |
rustup target add aarch64-apple-darwin x86_64-apple-darwin
make env
source env/bin/activate
maturin build --release --strip --target universal2-apple-darwin
mv target/wheels/ dist/
- name: upload macos dists
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pyrage-dists-macos
path: dist/
release-windows:
name: build Windows release dists
runs-on: windows-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version-file: pyproject.toml
- name: build wheels
shell: bash
run: |
make env
source env/Scripts/activate
maturin build --release --strip
mv target/wheels/ dist/
- name: upload windows dists
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: pyrage-dists-windows
path: dist/
pypi-publish:
name: publish all dists to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
# Used for OIDC publishing.
# Used to sign the release's artifacts with sigstore-python.
id-token: write
# Used to attach signing artifacts to the published release.
contents: write
needs:
- release-linux
- release-linux-arm
- release-macos
- release-windows
steps:
- name: fetch dists
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
pattern: pyrage-dists-*
path: dist/
merge-multiple: true
- name: publish
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0