Skip to content

Commit

Permalink
Fix repository workflow failure on push when there is no pre-release …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
MoojMidge committed Apr 26, 2024
1 parent 52e1f44 commit 9c972b7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release-development-repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit 9c972b7

Please sign in to comment.