Do not give workflow boolean inputs default values (#3014)
This commit is contained in:
@@ -4,18 +4,18 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
branches:
|
||||
- 'test-publish/*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
publish:
|
||||
description: 'Publish to PyPI (uncheck for dry run)'
|
||||
dry_run:
|
||||
description: 'Dry run (do not publish to PyPi)'
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
dev_release:
|
||||
description: 'Development release (DEV_RELEASE=1)'
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
- uses: ./.github/actions/build-docs
|
||||
|
||||
deploy_documentation:
|
||||
if: ${{ github.event_name == 'push' || inputs.publish }}
|
||||
if: ${{ !inputs.dry_run }}
|
||||
needs: build_documentation
|
||||
permissions:
|
||||
pages: write
|
||||
@@ -161,7 +161,7 @@ jobs:
|
||||
permissions:
|
||||
id-token: write
|
||||
environment:
|
||||
name: pypi
|
||||
name: ${{ inputs.dry_run && 'dry-run' || 'pypi' }}
|
||||
url: https://pypi.org/p/mlx
|
||||
steps:
|
||||
- uses: actions/download-artifact@v7
|
||||
@@ -177,7 +177,7 @@ jobs:
|
||||
- name: Display structure of downloaded files
|
||||
run: du -ah dist
|
||||
- name: Publish package distributions to PyPI
|
||||
if: ${{ github.event_name == 'push' || inputs.publish }}
|
||||
if: ${{ !inputs.dry_run }}
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
repository-url: https://upload.pypi.org/legacy/
|
||||
@@ -189,7 +189,7 @@ jobs:
|
||||
permissions:
|
||||
id-token: write
|
||||
environment:
|
||||
name: pypi
|
||||
name: ${{ inputs.dry_run && 'dry-run' || 'pypi' }}
|
||||
url: https://pypi.org/p/mlx-cuda
|
||||
steps:
|
||||
- uses: actions/download-artifact@v7
|
||||
@@ -200,7 +200,7 @@ jobs:
|
||||
- name: Display structure of downloaded files
|
||||
run: du -ah dist
|
||||
- name: Publish package distributions to PyPI
|
||||
if: ${{ github.event_name == 'push' || inputs.publish }}
|
||||
if: ${{ !inputs.dry_run }}
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
repository-url: https://upload.pypi.org/legacy/
|
||||
@@ -212,7 +212,7 @@ jobs:
|
||||
permissions:
|
||||
id-token: write
|
||||
environment:
|
||||
name: pypi
|
||||
name: ${{ inputs.dry_run && 'dry-run' || 'pypi' }}
|
||||
url: https://pypi.org/p/mlx-cpu
|
||||
steps:
|
||||
- uses: actions/download-artifact@v7
|
||||
@@ -223,7 +223,7 @@ jobs:
|
||||
- name: Display structure of downloaded files
|
||||
run: du -ah dist
|
||||
- name: Publish package distributions to PyPI
|
||||
if: ${{ github.event_name == 'push' || inputs.publish }}
|
||||
if: ${{ !inputs.dry_run }}
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
repository-url: https://upload.pypi.org/legacy/
|
||||
@@ -235,7 +235,7 @@ jobs:
|
||||
permissions:
|
||||
id-token: write
|
||||
environment:
|
||||
name: pypi
|
||||
name: ${{ inputs.dry_run && 'dry-run' || 'pypi' }}
|
||||
url: https://pypi.org/p/mlx-metal
|
||||
steps:
|
||||
- uses: actions/download-artifact@v7
|
||||
@@ -245,7 +245,7 @@ jobs:
|
||||
- name: Display structure of downloaded files
|
||||
run: du -ah dist
|
||||
- name: Publish package distributions to PyPI
|
||||
if: ${{ github.event_name == 'push' || inputs.publish }}
|
||||
if: ${{ !inputs.dry_run }}
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
repository-url: https://upload.pypi.org/legacy/
|
||||
|
||||
Reference in New Issue
Block a user