Skip to content
Discussion options

You must be logged in to vote

Hi @atrauzzi , 

Expressions don’t support ternary operators. You could create a feedback for this feature in the Feedback form for GitHub Actions .

As a workaround , you could add another step to set prerelease as true or false before Create Release step. In my example , I use set-output command to set an output variable in the front step, then use it in Create Release step .

- name: prerelease or not
  id: pre_or_not
  run: |
    if [$REF == 'refs/heads/master']
    then
        echo "::set-output name=prerelease::true"
    else
        echo "::set-output name=prerelease::false"
    fi
  env:
    REF: ${{ github.ref }}
  • name: Create Release
    id: create-release
    uses: actions/create-release@v1

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
2 replies
@onionhammer
Comment options

@akostadinov
Comment options

Comment options

You must be logged in to vote
1 reply
@nemanjaglumac
Comment options

Comment options

You must be logged in to vote
1 reply
@kbolino
Comment options

Comment options

You must be logged in to vote
1 reply
@samuliasmala
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product Feedback Share your thoughts and suggestions on GitHub features and improvements
9 participants