Skip to main content

Command referencegh release create

gh release create command (Linux & Windows / GitHub CLI)

Linux & WindowsGitHub CLIgitintermediate

What it does

Create a GitHub release with tag, title, notes, and optional assets. When people search for gh release create, they usually want practical GitHub CLI flags, safe examples, and how this subcommand fits everyday PR and repo workflows on Linux, Windows, and macOS. Syntax, options, and copyable examples are below.

Create a GitHub release with tag, title, notes, and optional assets.

Syntax

gh release create [<tag>] [<filename>...] [flags]

Common options

Flag / optionMeaning
-t, --titleRelease title.
-n, --notesRelease notes text.
-F, --notes-fileRead notes from a file.
-d, --draftCreate as a draft release.
-p, --prereleaseMark as prerelease.
--generate-notesAuto-generate notes from commits/PRs.

Practical examples

Tagged release

gh release create v1.2.0 --title "v1.2.0" --generate-notes

Creates a release for tag v1.2.0 with generated notes.

Upload asset

gh release create v1.2.0 ./dist/app.zip

Attaches a build artifact to the release.

Draft first

gh release create v1.2.0 --draft --notes-file CHANGELOG.md

Creates a draft so you can review before publishing.

Common mistakes

  • Creating a release for a tag that does not exist and forgetting gh can create the tag depending on flags/version.
  • Uploading secrets or untested binaries as release assets.

FAQ

What does gh release create do in GitHub CLI?

Create a GitHub release with tag, title, notes, and optional assets.

Does gh release create work on Windows and Linux?

Yes. The GitHub CLI (`gh`) runs on Linux, Windows, and macOS with the same subcommand syntax after you authenticate with `gh auth login`.

What is a practical gh release create example?

Try `gh release create v1.2.0 --title "v1.2.0" --generate-notes` — Creates a release for tag v1.2.0 with generated notes.

Do I need a token in the command line for gh release create?

Prefer `gh auth login` so credentials stay in the system keyring or secure storage. Avoid pasting personal access tokens into shell history.

Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.