From 9c972b7a9ecc65f3734e41a7646869d00ece034d Mon Sep 17 00:00:00 2001 From: MoojMidge <56883549+MoojMidge@users.noreply.github.com> Date: Sat, 27 Apr 2024 08:47:26 +1000 Subject: [PATCH] Fix repository workflow failure on push when there is no pre-release user input - need to quote string used for empty string conditional so that an empty input will be expanded to "" - Also use same variable name for input, temporary, and output --- .github/workflows/release-development-repository.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-development-repository.yml b/.github/workflows/release-development-repository.yml index 603522128..bebd0db07 100644 --- a/.github/workflows/release-development-repository.yml +++ b/.github/workflows/release-development-repository.yml @@ -2,7 +2,7 @@ name: Generate and Publish Development Repositories on: workflow_dispatch: inputs: - prerelease: + pre-release: description: 'Is this a pre-release? [true|false]' required: false default: 'true' @@ -22,14 +22,15 @@ jobs: steps: - name: Get and set release status - # workflow_dispatch: use prerelease variable for release status + # workflow_dispatch: use pre-release variable for release status # push-tag: check tag for alpha|beta|dev to determine release status id: release run: | version=${GITHUB_REF/refs\/tags\//} - if [[ ! -z ${{ github.event.inputs.prerelease }} ]] ; + pre-release=${github.event.inputs.pre-release} + if [[ ! -z "${pre-release}" ]] ; then - echo "pre-release=${{ github.event.inputs.prerelease }}" >> $GITHUB_OUTPUT + echo "pre-release=${pre-release}" >> $GITHUB_OUTPUT elif [[ $version == *[-+]@(alpha|beta|dev)*([.0-9a-z]) ]] ; then echo "pre-release=true" >> $GITHUB_OUTPUT