gh release
Publish a release and list releases
What it does
gh release create v1.2.0 creates a release on GitHub. If the tag does not exist yet, GitHub puts it on the latest commit of the default branch. --generate-notes builds the notes from the pull requests since the last release, --notes sets the text by hand, and --draft saves a draft.
Files listed after the tag are attached to the release: gh release create v1.2.0 dist/app.zip. gh release list lists releases, and gh release download <tag> downloads their files.
Syntax
gh release create <tag> --generate-notes
gh release create <tag> <file>…
gh release listExamples
Publish the release v1.2.0 with notes built from the pull requests
gh release create v1.2.0 --generate-notesrelease create— create a releasev1.2.0— the tag; GitHub creates it if missing--generate-notes— the list of changes from PRs since the last release
List the repository's releases
gh release listrelease— releaseslist— list, newest first
Related commands
- gh pr merge — Merge a pull request
- gh run — Follow GitHub Actions runs and read their logs
- gh workflow run — Start a GitHub Actions workflow by hand