bitrise-steplib/steps-github-release

Expressions for pre-release

Closed this issue · 5 comments

It looks like there's no way to set the pre-release flag based on an expression.

Issue with input: failed to parse config:
- PreRelease: {{enveq "SNAPSHOT_TAG" "flank_snapshot"}}: value is not in value options (opt[yes,no])

I worked around the issue like this:

 - github-release:
        run_if: enveq "SNAPSHOT_TAG" "flank_snapshot"
        inputs:
        - username: bootstraponline
        - name: Flank $BITRISE_GIT_TAG
        - body: Snapshot release for commit $COMMIT_HASH
        - files_to_upload: "$BITRISE_DEPLOY_DIR/flank.jar|flank.jar"
        - draft: 'no'
        - commit: master
        - tag: "$SNAPSHOT_TAG"
        - pre_release: 'yes'
        - api_token: "$GH_TOKEN"
        title: Github Release - Snapshot Only
    - github-release:
        run_if: not (enveq "SNAPSHOT_TAG" "flank_snapshot")
        inputs:
        - username: bootstraponline
        - name: Flank $BITRISE_GIT_TAG
        - body: Stable release for commit $COMMIT_HASH
        - files_to_upload: "$BITRISE_DEPLOY_DIR/flank.jar|flank.jar"
        - draft: 'no'
        - commit: master
        - tag: "$SNAPSHOT_TAG"
        - pre_release: 'no'
        - api_token: "$GH_TOKEN"
        title: Github Release - Release Only

Hi @bootstraponline,

Thanks for posting a workaround for this! However, we are moving away from managing issues on GitHub.

If you create a feature request at our public Discourse instance (https://discuss.bitrise.io/c/feature-request) it will possibly be picked up sooner.

Thanks. I recommend disabling the issue tracker on the GitHub repo.

Unfortunately, if we disable the issue tracker, the API will not serve up the open issues, so we can not disable them, until we have them migrated.

Sorry for the inconvenience. :/

Hello there, I'm a bot. On behalf of the community I thank you for opening this issue.

To help our human contributors focus on the most relevant reports, I check up on old issues to see if they're still relevant.
This issue has had no activity for 90 days, so I marked it as stale.

The community would appreciate if you could check if the issue still persists. If it isn't, please close it.
If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me".

If no comment left within 21 days, this issue will be closed.

I'll close this issue as it doesn't seem to be relevant anymore.
We believe an old issue probably has a bunch of context that's no longer relevant, therefore, if the problem still persists, please open a new issue.