Feature request: release support
Hi! One thing I often do on my repositories is create an official release from a given tag. Currently, this requires going to the website, finding the tag, editing it, and then copy/pasting the changelog/release notes. In some few cases, I also need to upload distribution files, but this is more rare.
So, feature request is something like this:
$ gh release --help
List of available commands:
release Provides a set of commands to work with repository Releases
-d, --detailed (Boolean) Full details for release (title, sha1, author, notes)
-D, --delete (Boolean) Delete the given release
--description (String) Release notes as a string
--description-file (String) Filename containing release notes to use
-l, --list (Boolean) List all releases for the repository
-t, --tag (String) Tag against which to create/delete the release
--title (String) Alternate title to use
--distfile (String) Filename to upload with the release; can use this option multiple times with different files
-O, --organization (String)
-r, --repo (String)
-u, --user (String)
Ideally, it'd be great to be able to pipe the description/notes to the command, and have it use those:
$ cat release_notes.md | gh release -t 1.4.0
# Or
$ gh release -t 1.4.0 < release_notes.md
Upload files would work as follows:
$ gh release -t 1.4.0 --distfile foo-1.4.0.tgz --distfile foo-1.4.0.zip < release_notes.md
The above would create the release, using the piped release notes, and uploading the two files to the release.
Thanks for the great tool; the little I've used it the last couple weeks, it's been a huge boon for many rote tasks I'd been having to use the web interface for!
Hey @weierophinney, this is a great idea.
I currently have a bash script for doing releases on another project (the release steps are mostly described in https://speakerdeck.com/henvic/writing-a-modern-cli-tool?slide=40, but I have to update a little bit) that we can use for a release command on gh and maybe we can elaborate on top of it.
You can see an outdated version of it at https://gist.github.com/henvic/e7f071ecf7dffd5694cb2856590c39d0
I think a "gh release" command would be something like it. I am actually rewriting part of it to make it more robust...
What do you think about prompting the user for each step, instead of passing them by flags?
PS: Sorry for taking 20 days to answer (we are overwhelmed with work :). And thank you for your nice work on the Zend Framework. I have been an user of it / PHP for many years. We have met at ZendCon '11, but you probably don't remember me.
Any update on this? I'm a new user would very much like support for releases, specifically the --list in my use case.
@vidavidorra I have written a tool that manipulates changelog files in Keep-A-Changelog format, and added tooling to that to perform releases (it pulls the changelog for the given release and pushes it to GitHub). It's written in PHP; if that sounds useful to you, you can find it at phly/keep-a-changelog.