1GH-RELEASE-CREATE(1)           GitHub CLI manual          GH-RELEASE-CREATE(1)
2
3
4

NAME

6       gh-release-create - Create a new release
7
8
9

SYNOPSIS

11       gh release create [<tag>] [<files>...]
12
13
14

DESCRIPTION

16       Create a new GitHub Release for a repository.
17
18
19       A list of asset files may be given to upload to the new release. To de‐
20       fine a display label for an asset, append text starting  with  #  after
21       the file name.
22
23
24       If  a  matching  git tag does not yet exist, one will automatically get
25       created from the latest state of the default branch.  Use  --target  to
26       point  to  a different branch or commit for the automatic tag creation.
27       Use --verify-tag to abort the release if the tag doesn't already exist.
28       To  fetch  the  new  tag locally after the release, do git fetch --tags
29       origin.
30
31
32       To create a release from an annotated git tag, first create one locally
33       with git, push the tag to GitHub, then run this command.
34
35
36       When  using automatically generated release notes, a release title will
37       also be automatically generated unless a title was  explicitly  passed.
38       Additional  release  notes  can be prepended to automatically generated
39       notes by using the notes parameter.
40
41
42

OPTIONS

44       --discussion-category <string>
45              Start a discussion in the specified category
46
47
48       -d, --draft
49              Save the release as a draft instead of publishing it
50
51
52       --generate-notes
53              Automatically generate title and notes for the release
54
55
56       --latest
57              Mark this release as "Latest" (default: automatic based on  date
58              and version)
59
60
61       -n, --notes <string>
62              Release notes
63
64
65       -F, --notes-file <file>
66              Read  release notes from file (use "-" to read from standard in‐
67              put)
68
69
70       --notes-start-tag <string>
71              Tag to use as the starting point for generating release notes
72
73
74       -p, --prerelease
75              Mark the release as a prerelease
76
77
78       --target <branch>
79              Target branch or full commit SHA (default: main branch)
80
81
82       -t, --title <string>
83              Release title
84
85
86       --verify-tag
87              Abort in case the git tag doesn't already exist  in  the  remote
88              repository
89
90
91

OPTIONS INHERITED FROM PARENT COMMANDS

93       -R, --repo <[HOST/]OWNER/REPO>
94              Select another repository using the [HOST/]OWNER/REPO format
95
96
97

EXAMPLE

99              Interactively create a release
100              $ gh release create
101
102              Interactively create a release from specific tag
103              $ gh release create v1.2.3
104
105              Non-interactively create a release
106              $ gh release create v1.2.3 --notes "bugfix release"
107
108              Use automatically generated release notes
109              $ gh release create v1.2.3 --generate-notes
110
111              Use release notes from a file
112              $ gh release create v1.2.3 -F changelog.md
113
114              Upload all tarballs in a directory as release assets
115              $ gh release create v1.2.3 ./dist/*.tgz
116
117              Upload a release asset with a display label
118              $ gh release create v1.2.3 '/path/to/asset.zip#My display label'
119
120              Create a release and start a discussion
121              $ gh release create v1.2.3 --discussion-category "General"
122
123
124
125
126

SEE ALSO

128       gh-release(1)
129
130
131
132                                   Jan 2023               GH-RELEASE-CREATE(1)
Impressum