@@ -41,22 +41,20 @@ jobs:
41
41
crate : cargo-edit
42
42
- uses : actions/checkout@v4
43
43
- name : Bump version
44
- run :
45
- cargo set-version -p pyproject-fmt --bump '${{ github.event.inputs.release == 'no' ||
46
- github.event.inputs.release == null && 'patch' || github.event.inputs.release }}'
44
+ run : cargo set-version -p pyproject-fmt --bump '${{ github.event.inputs.release == 'no' || github.event.inputs.release == null && 'patch' || github.event.inputs.release }}'
47
45
- name : Install the latest version of uv
48
46
uses : astral-sh/setup-uv@v3
49
47
with :
50
48
enable-cache : true
51
49
cache-dependency-glob : " tasks/changelog.py"
52
50
- name : Generate changelog
53
51
id : get-version
54
- run :
55
- uv run tasks/changelog.py pyproject-fmt "${{ github.event.number }}" "${{ github.event.pull_request.base.sha
56
- }}"
52
+ run : uv run tasks/changelog.py pyproject-fmt "${{ github.event.number }}" "${{ github.event.pull_request.base.sha }}"
57
53
env :
58
54
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
59
55
- uses : actions/setup-python@v5
56
+ with :
57
+ python-version : " 3.13"
60
58
-
uses :
pre-commit/[email protected]
61
59
continue-on-error : true
62
60
- name : Show changes to the repository
@@ -70,132 +68,126 @@ jobs:
70
68
retention-days : 1
71
69
if-no-files-found : " error"
72
70
73
- linux :
74
- needs : [bump]
75
- runs-on : ${{ matrix.platform.runner }}
76
- strategy :
77
- fail-fast : false
78
- matrix :
79
- platform :
80
- - runner : ubuntu-latest
81
- target : x86_64
82
- interpreter : " 3.8 pypy3.8 pypy3.9 pypy3.10"
83
- - runner : ubuntu-latest
84
- target : x86
85
- - runner : ubuntu-latest
86
- target : x86_64-unknown-linux-musl
87
- manylinux : musllinux_1_1
88
- - runner : ubuntu-latest
89
- target : i686-unknown-linux-musl
90
- manylinux : musllinux_1_1
91
- - runner : ubuntu-latest
92
- target : aarch64
93
- - runner : ubuntu-latest
94
- target : armv7
95
- - runner : ubuntu-latest
96
- target : s390x
97
- - runner : ubuntu-latest
98
- target : ppc64le
99
- steps :
100
- - name : Download the code
101
- uses : actions/download-artifact@v4
102
- with :
103
- name : source
104
- - name : Build wheels
105
- uses : PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
106
-
107
- with :
108
- target : ${{ matrix.platform.target }}
109
- args :
110
- -m pyproject-fmt/Cargo.toml --release --out dist --interpreter ${{ matrix.platform.interpreter || '3.8' }}
111
- --target-dir target
112
- sccache : " true"
113
- manylinux : ${{ matrix.platform.manylinux || 'auto' }}
114
- - name : Upload wheels
115
- uses : actions/upload-artifact@v4
116
- with :
117
- name : wheels-linux-${{ matrix.platform.target }}
118
- path : dist
119
-
120
- windows :
121
- needs : [bump]
122
- runs-on : ${{ matrix.platform.runner }}
123
- strategy :
124
- matrix :
125
- platform :
126
- - runner : windows-latest
127
- target : x64
128
- - runner : windows-latest
129
- target : x86
130
- steps :
131
- - name : Download the code
132
- uses : actions/download-artifact@v4
133
- with :
134
- name : source
135
- - name : Build wheels
136
- uses : PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
137
-
138
- with :
139
- target : ${{ matrix.platform.target }}
140
- args :
141
- -m pyproject-fmt/Cargo.toml --release --out dist --interpreter ${{ matrix.platform.interpreter || '3.8' }}
142
- --target-dir target
143
- sccache : " true"
144
- - name : Upload wheels
145
- uses : actions/upload-artifact@v4
146
- with :
147
- name : wheels-windows-${{ matrix.platform.target }}
148
- path : dist
149
-
150
- macos :
151
- needs : [bump]
152
- runs-on : ${{ matrix.platform.runner }}
153
- strategy :
154
- matrix :
155
- platform :
156
- - runner : macos-latest
157
- target : x86_64
158
- - runner : macos-14
159
- target : aarch64
160
- steps :
161
- - name : Download the code
162
- uses : actions/download-artifact@v4
163
- with :
164
- name : source
165
- - name : Build wheels
166
- uses : PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
167
-
168
- with :
169
- target : ${{ matrix.platform.target }}
170
- args :
171
- -m pyproject-fmt/Cargo.toml --release --out dist --interpreter "3.8 pypy3.8 pypy3.9 pypy3.10" --target-dir
172
- target
173
- sccache : " true"
174
- - name : Upload wheels
175
- uses : actions/upload-artifact@v4
176
- with :
177
- name : wheels-macos-${{ matrix.platform.target }}
178
- path : dist
179
-
180
- sdist :
181
- needs : [bump]
182
- runs-on : ubuntu-latest
183
- steps :
184
- - name : Download the code
185
- uses : actions/download-artifact@v4
186
- with :
187
- name : source
188
- - name : Build sdist
189
- uses : PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
190
-
191
- with :
192
- command : sdist
193
- args : -m pyproject-fmt/Cargo.toml --out dist
194
- - name : Upload sdist
195
- uses : actions/upload-artifact@v4
196
- with :
197
- name : wheels-sdist
198
- path : dist
71
+ # linux:
72
+ # needs: [bump]
73
+ # runs-on: ${{ matrix.platform.runner }}
74
+ # strategy:
75
+ # fail-fast: false
76
+ # matrix:
77
+ # platform:
78
+ # - runner: ubuntu-latest
79
+ # target: x86_64
80
+ # interpreter: "3.8 pypy3.8 pypy3.9 pypy3.10"
81
+ # - runner: ubuntu-latest
82
+ # target: x86
83
+ # - runner: ubuntu-latest
84
+ # target: x86_64-unknown-linux-musl
85
+ # manylinux: musllinux_1_1
86
+ # - runner: ubuntu-latest
87
+ # target: i686-unknown-linux-musl
88
+ # manylinux: musllinux_1_1
89
+ # - runner: ubuntu-latest
90
+ # target: aarch64
91
+ # - runner: ubuntu-latest
92
+ # target: armv7
93
+ # - runner: ubuntu-latest
94
+ # target: s390x
95
+ # - runner: ubuntu-latest
96
+ # target: ppc64le
97
+ # steps:
98
+ # - name: Download the code
99
+ # uses: actions/download-artifact@v4
100
+ # with:
101
+ # name: source
102
+ # - name: Build wheels
103
+ # uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
104
+ #
105
+ # with:
106
+ # target: ${{ matrix.platform.target }}
107
+ # args: -m pyproject-fmt/Cargo.toml --release --out dist --interpreter ${{ matrix.platform.interpreter || '3.8' }} --target-dir target
108
+ # sccache: "true"
109
+ # manylinux: ${{ matrix.platform.manylinux || 'auto' }}
110
+ # - name: Upload wheels
111
+ # uses: actions/upload-artifact@v4
112
+ # with:
113
+ # name: wheels-linux-${{ matrix.platform.target }}
114
+ # path: dist
115
+ #
116
+ # windows:
117
+ # needs: [bump]
118
+ # runs-on: ${{ matrix.platform.runner }}
119
+ # strategy:
120
+ # matrix:
121
+ # platform:
122
+ # - runner: windows-latest
123
+ # target: x64
124
+ # - runner: windows-latest
125
+ # target: x86
126
+ # steps:
127
+ # - name: Download the code
128
+ # uses: actions/download-artifact@v4
129
+ # with:
130
+ # name: source
131
+ # - name: Build wheels
132
+ # uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
133
+ #
134
+ # with:
135
+ # target: ${{ matrix.platform.target }}
136
+ # args: -m pyproject-fmt/Cargo.toml --release --out dist --interpreter ${{ matrix.platform.interpreter || '3.8' }} --target-dir target
137
+ # sccache: "true"
138
+ # - name: Upload wheels
139
+ # uses: actions/upload-artifact@v4
140
+ # with:
141
+ # name: wheels-windows-${{ matrix.platform.target }}
142
+ # path: dist
143
+ #
144
+ # macos:
145
+ # needs: [bump]
146
+ # runs-on: ${{ matrix.platform.runner }}
147
+ # strategy:
148
+ # matrix:
149
+ # platform:
150
+ # - runner: macos-latest
151
+ # target: x86_64
152
+ # - runner: macos-14
153
+ # target: aarch64
154
+ # steps:
155
+ # - name: Download the code
156
+ # uses: actions/download-artifact@v4
157
+ # with:
158
+ # name: source
159
+ # - name: Build wheels
160
+ # uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
161
+ #
162
+ # with:
163
+ # target: ${{ matrix.platform.target }}
164
+ # args: -m pyproject-fmt/Cargo.toml --release --out dist --interpreter "3.8 pypy3.8 pypy3.9 pypy3.10" --target-dir target
165
+ # sccache: "true"
166
+ # - name: Upload wheels
167
+ # uses: actions/upload-artifact@v4
168
+ # with:
169
+ # name: wheels-macos-${{ matrix.platform.target }}
170
+ # path: dist
171
+ #
172
+ # sdist:
173
+ # needs: [bump]
174
+ # runs-on: ubuntu-latest
175
+ # steps:
176
+ # - name: Download the code
177
+ # uses: actions/download-artifact@v4
178
+ # with:
179
+ # name: source
180
+ # - name: Build sdist
181
+ # uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
182
+ #
183
+ # with:
184
+ # command: sdist
185
+ # args: -m pyproject-fmt/Cargo.toml --out dist
186
+ # - name: Upload sdist
187
+ # uses: actions/upload-artifact@v4
188
+ # with:
189
+ # name: wheels-sdist
190
+ # path: dist
199
191
200
192
release :
201
193
name : Release
@@ -206,25 +198,39 @@ jobs:
206
198
permissions :
207
199
id-token : write
208
200
contents : write
209
- if : github.event.inputs.release != 'no' && github.event.inputs.release != null && github.ref == 'main'
210
- needs : [linux, windows, macos, sdist, bump]
201
+ if : github.event.inputs.release != 'no' && github.event.inputs.release != null && github.ref == 'refs/heads/ main'
202
+ needs : [bump]
211
203
steps :
212
204
- uses : actions/checkout@v4
213
- - uses : actions/download-artifact@v4
205
+ - name : Download source
206
+ uses : actions/download-artifact@v4
207
+ with :
208
+ name : source
209
+ path : .
214
210
- name : Show changes to the repository
215
211
run : git diff HEAD -u
212
+ - name : Show wheels
213
+ run : ls -lath .
216
214
- name : Commit changes
217
215
run : |
218
216
git config --global user.name 'Bernat Gabor'
219
217
git config --global user.email '[email protected] '
220
218
git commit -am "Release pyproject-fmt ${{needs.bump.outputs.version}}"
221
219
- name : Tag release
222
220
run : git tag pyproject-fmt/${{needs.bump.outputs.version}}
221
+ - name : Download wheels
222
+ uses : actions/download-artifact@v4
223
+ with :
224
+ pattern : wheels-*
225
+ path : dist
226
+ merge-multiple : ' true'
227
+ - name : Show wheels
228
+ run : ls -lath dist && exit 1
223
229
- name : Publish to PyPI
224
230
uses : PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
225
231
with :
226
232
command : upload
227
- args : --non-interactive --skip-existing wheels-* /*
233
+ args : --non-interactive --skip-existing dist /*
228
234
- name : Push release commit+tag and create GitHub release
229
235
env :
230
236
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments