From d48b63f48d7a2cfe136ad8f503c6ad0c77284299 Mon Sep 17 00:00:00 2001 From: "Keto D. Zhang" Date: Sun, 28 Apr 2024 17:46:37 -0700 Subject: [PATCH] Fix bad workflow dispatch publish toggle by inverting with disable-publish inputs --- .github/workflows/publish.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f3b48a8c..18831b08 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,16 +7,13 @@ on: types: [published] workflow_dispatch: inputs: - publish: + disable-publish: description: | - Should publish to PyPA (default false for manual runs). Artifacts are + Disables publish to PyPA (default, true for manual runs). Artifacts are available in both cases. - default: false + default: true type: boolean -env: - PUBLISH: ${{ inputs.publish == '' && true || inputs.publish }} # Default true for automatic runs - jobs: build_wheels: @@ -96,7 +93,7 @@ jobs: path: dist/ - name: Publish package to PyPI - if: ${{ env.PUBLISH }} + if: ! ${{ inputs.disable-publish || false }} # Only skips if inputs.disable-publish is true # All files in dist/ are published uses: pypa/gh-action-pypi-publish@release/v1 with: