1
- # This file is autogenerated by maturin v1.7.1
1
+ # This file is autogenerated by maturin v1.7.4
2
2
# To update, run
3
3
#
4
- # maturin generate-ci github
4
+ # maturin generate-ci github --manifest-path crates/cli/Cargo.toml --output .github/workflows/python-ci.yaml
5
5
#
6
6
name : CI
7
7
8
8
on :
9
9
push :
10
+ branches :
11
+ - main
12
+ - master
10
13
tags :
11
- - " v*.*.*"
14
+ - ' *'
15
+ pull_request :
12
16
workflow_dispatch :
13
17
14
18
permissions :
@@ -28,21 +32,24 @@ jobs:
28
32
target : aarch64
29
33
- runner : ubuntu-latest
30
34
target : armv7
35
+ # - runner: ubuntu-latest
36
+ # target: s390x
37
+ - runner : ubuntu-latest
38
+ target : ppc64le
31
39
steps :
32
40
- uses : actions/checkout@v4
33
41
- name : Build wheels
34
42
uses : PyO3/maturin-action@v1
35
43
with :
36
- working-directory : crates/cli
37
44
target : ${{ matrix.platform.target }}
38
- args : --release --out dist
39
- sccache : " true"
45
+ args : --release --out dist --manifest-path crates/cli/Cargo.toml
46
+ sccache : ' true'
40
47
manylinux : auto
41
48
- name : Upload wheels
42
49
uses : actions/upload-artifact@v4
43
50
with :
44
51
name : wheels-linux-${{ matrix.platform.target }}
45
- path : crates/cli/ dist
52
+ path : dist
46
53
47
54
musllinux :
48
55
runs-on : ${{ matrix.platform.runner }}
@@ -62,16 +69,15 @@ jobs:
62
69
- name : Build wheels
63
70
uses : PyO3/maturin-action@v1
64
71
with :
65
- working-directory : crates/cli
66
72
target : ${{ matrix.platform.target }}
67
- args : --release --out dist
68
- sccache : " true"
73
+ args : --release --out dist --manifest-path crates/cli/Cargo.toml
74
+ sccache : ' true'
69
75
manylinux : musllinux_1_2
70
76
- name : Upload wheels
71
77
uses : actions/upload-artifact@v4
72
78
with :
73
79
name : wheels-musllinux-${{ matrix.platform.target }}
74
- path : crates/cli/ dist
80
+ path : dist
75
81
76
82
windows :
77
83
runs-on : ${{ matrix.platform.runner }}
@@ -87,15 +93,15 @@ jobs:
87
93
- name : Build wheels
88
94
uses : PyO3/maturin-action@v1
89
95
with :
90
- working-directory : crates/cli
91
96
target : ${{ matrix.platform.target }}
92
- args : --release --out dist
93
- sccache : " true"
97
+ args : --release --out dist --manifest-path crates/cli/Cargo.toml
98
+ sccache : ' true'
94
99
- name : Upload wheels
95
100
uses : actions/upload-artifact@v4
96
101
with :
97
102
name : wheels-windows-${{ matrix.platform.target }}
98
- path : crates/cli/dist
103
+ path : dist
104
+
99
105
macos :
100
106
runs-on : ${{ matrix.platform.runner }}
101
107
strategy :
@@ -110,44 +116,50 @@ jobs:
110
116
- name : Build wheels
111
117
uses : PyO3/maturin-action@v1
112
118
with :
113
- working-directory : crates/cli
114
119
target : ${{ matrix.platform.target }}
115
- args : --release --out dist
116
- sccache : " true"
120
+ args : --release --out dist --manifest-path crates/cli/Cargo.toml
121
+ sccache : ' true'
117
122
- name : Upload wheels
118
123
uses : actions/upload-artifact@v4
119
124
with :
120
125
name : wheels-macos-${{ matrix.platform.target }}
121
- path : crates/cli/ dist
126
+ path : dist
122
127
123
- # # For some reason the sdist command fails with an error when running the github action.
124
- # # Not sure if thisnis actually needed for sqruff???
125
128
sdist :
126
129
runs-on : ubuntu-latest
127
130
steps :
128
131
- uses : actions/checkout@v4
129
132
- name : Build sdist
130
- uses : PyO3/maturin-action@v1.44.0
133
+ uses : PyO3/maturin-action@v1
131
134
with :
132
- working-directory : crates/cli
133
- target : x86_64
134
135
command : sdist
135
- args : --out dist
136
+ args : --out dist --manifest-path crates/cli/Cargo.toml
136
137
- name : Upload sdist
137
138
uses : actions/upload-artifact@v4
138
139
with :
139
140
name : wheels-sdist
140
- path : crates/cli/ dist
141
+ path : dist
141
142
142
143
release :
143
144
name : Release
144
145
runs-on : ubuntu-latest
145
- environment : production
146
- # if: "startsWith(github.ref, 'refs/tags/')"
146
+ if : ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
147
147
needs : [linux, musllinux, windows, macos, sdist]
148
+ permissions :
149
+ # Use to sign the release artifacts
150
+ id-token : write
151
+ # Used to upload release artifacts
152
+ contents : write
153
+ # Used to generate artifact attestation
154
+ attestations : write
148
155
steps :
149
156
- uses : actions/download-artifact@v4
157
+ - name : Generate artifact attestation
158
+ uses : actions/attest-build-provenance@v1
159
+ with :
160
+ subject-path : ' wheels-*/*'
150
161
- name : Publish to PyPI
162
+ if : " startsWith(github.ref, 'refs/tags/')"
151
163
uses : PyO3/maturin-action@v1
152
164
env :
153
165
MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments