.nh .TH "GH-RELEASE-CREATE" "1" "Oct 2022" "" "GitHub CLI manual" .SH NAME .PP gh-release-create - Create a new release .SH SYNOPSIS .PP \fB\fCgh release create [] [...]\fR .SH DESCRIPTION .PP Create a new GitHub Release for a repository. .PP A list of asset files may be given to upload to the new release. To define a display label for an asset, append text starting with \fB\fC#\fR after the file name. .PP If a matching git tag does not yet exist, one will automatically get created from the latest state of the default branch. Use \fB\fC--target\fR to override this. To fetch the new tag locally after the release, do \fB\fCgit fetch --tags origin\fR\&. .PP To create a release from an annotated git tag, first create one locally with git, push the tag to GitHub, then run this command. .PP When using automatically generated release notes, a release title will also be automatically generated unless a title was explicitly passed. Additional release notes can be prepended to automatically generated notes by using the notes parameter. .SH OPTIONS .TP \fB\fC--discussion-category\fR \fB\fC\fR Start a discussion in the specified category .TP \fB\fC-d\fR, \fB\fC--draft\fR Save the release as a draft instead of publishing it .TP \fB\fC--generate-notes\fR Automatically generate title and notes for the release .TP \fB\fC-n\fR, \fB\fC--notes\fR \fB\fC\fR Release notes .TP \fB\fC-F\fR, \fB\fC--notes-file\fR \fB\fC\fR Read release notes from file (use "-" to read from standard input) .TP \fB\fC--notes-start-tag\fR \fB\fC\fR Tag to use as the starting point for generating release notes .TP \fB\fC-p\fR, \fB\fC--prerelease\fR Mark the release as a prerelease .TP \fB\fC--target\fR \fB\fC\fR Target branch or full commit SHA (default: main branch) .TP \fB\fC-t\fR, \fB\fC--title\fR \fB\fC\fR Release title .SH OPTIONS INHERITED FROM PARENT COMMANDS .TP \fB\fC-R\fR, \fB\fC--repo\fR \fB\fC<[HOST/]OWNER/REPO>\fR Select another repository using the [HOST/]OWNER/REPO format .SH EXAMPLE .PP .RS .nf Interactively create a release $ gh release create Interactively create a release from specific tag $ gh release create v1.2.3 Non-interactively create a release $ gh release create v1.2.3 --notes "bugfix release" Use automatically generated release notes $ gh release create v1.2.3 --generate-notes Use release notes from a file $ gh release create v1.2.3 -F changelog.md 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 $ gh release create v1.2.3 '/path/to/asset.zip#My display label' Create a release and start a discussion $ gh release create v1.2.3 --discussion-category "General" .fi .RE .SH SEE ALSO .PP \fB\fCgh-release(1)\fR