Merge pull request #3495 from cli/release-create-eg

add some more examples for release create
This commit is contained in:
Nate Smith 2021-04-23 11:50:46 -05:00 committed by GitHub
commit bf7ed68aa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,13 +78,19 @@ func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Co
git, push the tag to GitHub, then run this command.
`, "`"),
Example: heredoc.Doc(`
# use release notes from a file
Interactively create a release
$ gh release create v1.2.3
Non-interactively create a release
$ gh release create v1.2.3 --notes "bugfix release"
Use release notes from a file
$ gh release create v1.2.3 -F changelog.md
# upload all tarballs in a directory as release assets
Upload all tarballs in a directory as release assets
$ gh release create v1.2.3 ./dist/*.tgz
# upload a release asset with a display label
Upload a release asset with a display label
$ gh release create v1.2.3 '/path/to/asset.zip#My display label'
`),
Args: cmdutil.MinimumArgs(1, "could not create: no tag name provided"),