github-tag-action icon indicating copy to clipboard operation
github-tag-action copied to clipboard

'append_to_pre_release_tag' returns the branch name when provided an empty string

Open victorhearnyeates opened this issue 3 years ago • 5 comments

I want to create a new tag, but have no suffix added by the action. However the use of the ternary operator in the action.ts code means that it interepts this empty string as not providing a value and instead uses the default of the branch name.

https://github.com/mathieudutour/github-tag-action/blob/master/src/action.ts#L65

Basically, we need some way to be able to provide an empty string if we want nothing appended

victorhearnyeates avatar Apr 11 '22 08:04 victorhearnyeates

I am looking for the same solution.

diogomonte avatar May 01 '22 10:05 diogomonte

Duplicate of #163

And I also have the same issue.

epignatelli avatar Jan 29 '23 12:01 epignatelli

You could set all branches to be release branches so it generates a tag like main by default:

      - name: Push patch tag
        id: push_patch_tag
        uses: mathieudutour/[email protected]
        with:
          github_token: ${{ secrets.GH_TOKEN }}
          # Ensure this branch is considered a release and it gets a normal tag
          release_branches: .*

mikejflex avatar Sep 01 '23 00:09 mikejflex