-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
Describe the feature or problem you’d like to solve
Follow up of this comment of #1552, creating a new issue as asked by @mislav.
A new gh release create command has been added, but currently the tag number is required (ie. gh release create v2.1.0).
But in an automation process, the tag creation is automated too, so you do not know directly its number. Examples of releases scripts:
- for a VS Code extension:
vsce publish minor && git push && git push --tags- for a npm package:
npm run build && npm version minor && npm publish dist && git push && git push --tags;In both cases, the tag creation is automated (by vsce publish or npm version), so we don't have access to the tag number directly.
Proposed solution
Make the tag parameter in gh release create optional, or add a keyword to use the latest created one (for example gh release create latest).
Additional context
There are workarounds, but difficult:
- @mislav suggested the use of the output of
git tag --sort=-creatordate | head -1 - you can use
$npm_package_version(but it is not cross-platform, the syntax is different is a Windows shell)
Also note that in the VS Code extension example, the packaged VSIX file will be added to the GitHub release, and its name contains the version number (ie. gh release create v2.1.0 some-extension-2.1.0.vsix).