-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh release create --use-latest-tag
#9395
Comments
@fregante : Thanks for opening up this suggestion! Couple of questions to help understand the scope of this potential enhancement:
Looking at GitHub Actions workflows executing |
Good question. I don't know how gh-cli deals with these cases normally so I couldn't give an appropriate response. It wouldn't matter in my case since I could just push the tag first.
The same that already happens when you call it twice:
It's not clear from that search, but any call you see followed by ${{ user input }} it also accepts keywords like patch, minor, major, prerelease, so they all fall into this (if they also used gh-cli. Also, as prior art: sindresorhus/np#578 This tool can be used for the same purpose: it uses the "latest tag" to create a release draft: |
Describe the feature or problem you’d like to solve
In my npm publish workflow, I generate a version and tag via
npm version minor
and I want to reuse that last tag that was generated.This currently requires first storing the output of
npm version minor
into a $VERSION env and then reusing it asgh release create $VERSION
Proposed solution
This seems redundant as usually I'd expect people to want to release the latest tag, if HEAD has already been tagged.
gh release create
does starts an interactive flow, so what do you think about:This will use the first tag found on HEAD. Alternative, if common and easy in git, it could use first tag found in reverse chronological order.
The text was updated successfully, but these errors were encountered: