gt-release-create(1)

gt-release-create1

Create a release

Usage

gt release create [<tag>] [<file> ...] [flags]

Overview

Create a release for a tag, and upload the files that follow the tag as its assets. Gitea creates the tag at --target (the default branch) when it does not exist yet. The title defaults to the tag. Without a tag and flags on a terminal, a form asks for the tag, title, notes, target, and whether the release is a draft or a prerelease.

gt never pushes: commits and tags that only exist in your clone are not on the server, so push them first (git push <remote> <tag>). In a clone, a tag that only exists locally is refused unless --target says where Gitea creates it, and a new tag without --target is refused unless HEAD is the head of the default branch on the server. A --target that is no branch on the server, such as HEAD or a short SHA, names the commit it resolves to in the clone. --verify-tag refuses any tag that is not on the server yet.

Json fields

assets, author, body, created_at, draft, id, prerelease, published_at, tag,
target, title, url

Options

--asset=[]
File to upload as an asset (repeatable)

-d, --draft[=false]
Save the release as a draft

-e, --editor[=false]
Write release notes in an editor

-h, --help[=false]
help for create

-n, --notes=""
Release notes

-F, --notes-file=""
Read release notes from a file, or - for standard input

-p, --prerelease[=false]
Mark the release as a prerelease

--target=""
Branch or commit the tag points to, when it is new

-t, --title=""
Release title

--verify-tag[=false]
Fail if the tag does not exist on the server yet

Options inherited from parent commands

--csv[=""]
Output CSV with the specified comma-separated fields, or all fields

--cwd=""
Working directory for repository discovery

--debug[=false]
Log the method, URL, status, and duration of each HTTP request to stderr

--host=""
Gitea instance URL, including any base path

--interactive[=false]
Allow prompts with machine output

-q, --jq=""
Filter JSON output using a jq expression; implies --json

--json[=""]
Output JSON with the specified comma-separated fields, or all fields

--no-input[=false]
Disable prompts and implicit editor/browser interactions

--remote=""
Git remote used for repository discovery

-R, --repo=""
Select a repository as OWNER/REPO or URL

--sudo=""
Perform API requests as this user (requires an administrator account)

--user=""
Account name on the selected instance

Examples

# Create a release in a form
$ gt release create
# Create a release with notes from a file and two assets
$ gt release create v1.0.0 dist/gt-linux dist/gt-darwin --notes-file CHANGELOG.md
# Create a draft prerelease of a new tag on a branch
$ gt release create v1.1.0-rc1 --target release/1.1 --draft --prerelease --title "1.1 RC 1"

From gitea-cli 1.0.0-1 in Arch Linux 2026-11-07. Parsed by carta from the page's man source.