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.  Use --notes-
34       from-tag to automatically generate the release notes      from the  an‐
35       notated git tag.
36
37
38       When  using automatically generated release notes, a release title will
39       also be automatically generated unless a title was  explicitly  passed.
40       Additional  release  notes  can be prepended to automatically generated
41       notes by using the notes parameter.
42
43
44

OPTIONS

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

OPTIONS INHERITED FROM PARENT COMMANDS

99       -R, --repo <[HOST/]OWNER/REPO>
100              Select another repository using the [HOST/]OWNER/REPO format
101
102
103

EXAMPLE

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

SEE ALSO

134       gh-release(1)
135
136
137
138                                   Oct 2023               GH-RELEASE-CREATE(1)
Impressum