1GH-RELEASE-CREATE(1) GitHub CLI manual GH-RELEASE-CREATE(1)
2
3
4
6 gh-release-create - Create a new release
7
8
9
11 gh release create [<tag>] [<files>...]
12
13
14
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 override this. To fetch the new tag locally after the release, do git
27 fetch --tags origin.
28
29
30 To create a release from an annotated git tag, first create one locally
31 with git, push the tag to GitHub, then run this command.
32
33
34 When using automatically generated release notes, a release title will
35 also be automatically generated unless a title was explicitly passed.
36 Additional release notes can be prepended to automatically generated
37 notes by using the notes parameter.
38
39
40
42 --discussion-category <string>
43 Start a discussion in the specified category
44
45
46 -d, --draft
47 Save the release as a draft instead of publishing it
48
49
50 --generate-notes
51 Automatically generate title and notes for the release
52
53
54 -n, --notes <string>
55 Release notes
56
57
58 -F, --notes-file <file>
59 Read release notes from file (use "-" to read from standard in‐
60 put)
61
62
63 -p, --prerelease
64 Mark the release as a prerelease
65
66
67 --target <branch>
68 Target branch or full commit SHA (default: main branch)
69
70
71 -t, --title <string>
72 Release title
73
74
75
77 -R, --repo <[HOST/]OWNER/REPO>
78 Select another repository using the [HOST/]OWNER/REPO format
79
80
81
83 Interactively create a release
84 $ gh release create
85
86 Interactively create a release from specific tag
87 $ gh release create v1.2.3
88
89 Non-interactively create a release
90 $ gh release create v1.2.3 --notes "bugfix release"
91
92 Use automatically generated release notes
93 $ gh release create v1.2.3 --generate-notes
94
95 Use release notes from a file
96 $ gh release create v1.2.3 -F changelog.md
97
98 Upload all tarballs in a directory as release assets
99 $ gh release create v1.2.3 ./dist/*.tgz
100
101 Upload a release asset with a display label
102 $ gh release create v1.2.3 '/path/to/asset.zip#My display label'
103
104 Create a release and start a discussion
105 $ gh release create v1.2.3 --discussion-category "General"
106
107
108
109
110
112 gh-release(1)
113
114
115
116 Jun 2022 GH-RELEASE-CREATE(1)