Skip to content

Commit 7cf076b

Browse files
committed
Better output
1 parent e402011 commit 7cf076b

1 file changed

Lines changed: 25 additions & 23 deletions

File tree

.github/workflows/release.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ on:
66
- 'v*'
77
workflow_dispatch:
88
inputs:
9-
dry_run:
10-
description: 'Dry run (use "false" to publish to PyPI)'
11-
required: true
12-
default: 'false'
9+
publish:
10+
description: 'Publish to PyPI (uncheck for dry run)'
11+
required: false
12+
type: boolean
13+
default: true
1314
dev_release:
14-
description: 'Dev release (use "false" to do a regular release)'
15-
required: true
16-
default: 'false'
15+
description: 'Development release (DEV_RELEASE=1)'
16+
required: false
17+
type: boolean
18+
default: false
1719

1820
permissions:
1921
contents: read
@@ -27,7 +29,7 @@ jobs:
2729
- uses: ./.github/actions/build-docs
2830

2931
deploy_documentation:
30-
if: github.event.inputs.dry_run == 'false'
32+
if: github.event.inputs.publish
3133
needs: build_documentation
3234
permissions:
3335
pages: write
@@ -50,7 +52,7 @@ jobs:
5052
runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-22.04' || 'ubuntu-22.04-arm' }}
5153
env:
5254
PYPI_RELEASE: 1
53-
DEV_RELEASE: ${{ github.event.inputs.dev_release == 'true' && 1 || 0 }}
55+
DEV_RELEASE: ${{ github.event.inputs.dev_release && 1 || 0 }}
5456
steps:
5557
- uses: actions/checkout@v6
5658
- uses: ./.github/actions/setup-linux
@@ -85,7 +87,7 @@ jobs:
8587
runs-on: [self-hosted, macos]
8688
env:
8789
PYPI_RELEASE: 1
88-
DEV_RELEASE: ${{ github.event.inputs.dev_release == 'true' && 1 || 0 }}
90+
DEV_RELEASE: ${{ github.event.inputs.dev_release && 1 || 0 }}
8991
steps:
9092
- uses: actions/checkout@v6
9193
- uses: ./.github/actions/setup-macos
@@ -138,7 +140,7 @@ jobs:
138140
runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-22-large' || 'ubuntu-22-large-arm' }}
139141
env:
140142
PYPI_RELEASE: 1
141-
DEV_RELEASE: ${{ github.event.inputs.dev_release == 'true' && 1 || 0 }}
143+
DEV_RELEASE: ${{ github.event.inputs.dev_release && 1 || 0 }}
142144
steps:
143145
- uses: actions/checkout@v6
144146
- uses: ./.github/actions/setup-linux
@@ -164,7 +166,7 @@ jobs:
164166
permissions:
165167
id-token: write
166168
environment:
167-
name: ${{ github.event.inputs.dry_run == 'false' && 'pypi' || '' }}
169+
name: ${{ github.event.inputs.publish && 'pypi' || '' }}
168170
url: https://pypi.org/p/mlx
169171
steps:
170172
- uses: actions/download-artifact@v7
@@ -178,9 +180,9 @@ jobs:
178180
merge-multiple: true
179181
path: dist
180182
- name: Display structure of downloaded files
181-
run: ls -lR dist
183+
run: du -ah dist
182184
- name: Publish package distributions to PyPI
183-
if: github.event.inputs.dry_run == 'false'
185+
if: github.event.inputs.publish
184186
uses: pypa/gh-action-pypi-publish@release/v1
185187
with:
186188
repository-url: https://upload.pypi.org/legacy/
@@ -192,17 +194,17 @@ jobs:
192194
permissions:
193195
id-token: write
194196
environment:
195-
name: ${{ github.event.inputs.dry_run == 'false' && 'pypi' || '' }}
197+
name: ${{ github.event.inputs.publish && 'pypi' || '' }}
196198
url: https://pypi.org/p/mlx-cuda
197199
steps:
198200
- uses: actions/download-artifact@v7
199201
with:
200202
name: mlx-cuda-*
201203
path: dist
202204
- name: Display structure of downloaded files
203-
run: ls -lR dist
205+
run: du -ah dist
204206
- name: Publish package distributions to PyPI
205-
if: github.event.inputs.dry_run == 'false'
207+
if: github.event.inputs.publish
206208
uses: pypa/gh-action-pypi-publish@release/v1
207209
with:
208210
repository-url: https://upload.pypi.org/legacy/
@@ -214,7 +216,7 @@ jobs:
214216
permissions:
215217
id-token: write
216218
environment:
217-
name: ${{ github.event.inputs.dry_run == 'false' && 'pypi' || '' }}
219+
name: ${{ github.event.inputs.publish && 'pypi' || '' }}
218220
url: https://pypi.org/p/mlx-cpu
219221
steps:
220222
- uses: actions/download-artifact@v7
@@ -223,9 +225,9 @@ jobs:
223225
merge-multiple: true
224226
path: dist
225227
- name: Display structure of downloaded files
226-
run: ls -lR dist
228+
run: du -ah dist
227229
- name: Publish package distributions to PyPI
228-
if: github.event.inputs.dry_run == 'false'
230+
if: github.event.inputs.publish
229231
uses: pypa/gh-action-pypi-publish@release/v1
230232
with:
231233
repository-url: https://upload.pypi.org/legacy/
@@ -237,17 +239,17 @@ jobs:
237239
permissions:
238240
id-token: write
239241
environment:
240-
name: ${{ github.event.inputs.dry_run == 'false' && 'pypi' || '' }}
242+
name: ${{ github.event.inputs.publish && 'pypi' || '' }}
241243
url: https://pypi.org/p/mlx-metal
242244
steps:
243245
- uses: actions/download-artifact@v7
244246
with:
245247
name: mlx-metal
246248
path: dist
247249
- name: Display structure of downloaded files
248-
run: ls -lR dist
250+
run: du -ah dist
249251
- name: Publish package distributions to PyPI
250-
if: github.event.inputs.dry_run == 'false'
252+
if: github.event.inputs.publish
251253
uses: pypa/gh-action-pypi-publish@release/v1
252254
with:
253255
repository-url: https://upload.pypi.org/legacy/

0 commit comments

Comments
 (0)