LinuxCommandLibrary

glab-release

Create GitLab project releases

TLDR

List releases in a Gitlab repository, limited to 30 items

$ glab release list
copy

Display information about a specific release
$ glab release view [tag]
copy

Create a new release
$ glab release create [tag]
copy

Delete a specific release
$ glab release delete [tag]
copy

Download assets from a specific release
$ glab release download [tag]
copy

Upload assets to a specific release
$ glab release upload [tag] [path/to/file1 path/to/file2 ...]
copy

SYNOPSIS

glab release <command> [<flags>]
Commands: create <tag>, list, view <tag>, edit <tag>, delete <tag>

PARAMETERS

create <tag>
    Create a new release for the specified tag

list
    List all releases in the project

view <tag>
    View details of a release by tag

edit <tag>
    Edit an existing release by tag

delete <tag>
    Delete a release by tag

--title <title>
    Release title (create/edit)

--description <text|@file>
    Release description or file path (create/edit)

--milestone <id>
    Associate milestone ID (create/edit)

--assets-links <link>...
    Attach asset links (create/edit)

--assets-file <file>...
    Attach asset files (create/edit)

--tag-name <name>
    Custom tag name (create)

--target <commit|branch>
    Target commit or branch (create)

--draft
    Create as draft release

-R, --repo <uri>
    Target repository

--limit <num>
    Max items per page (list)

--page <num>
    Page number (list)

DESCRIPTION

glab release is a subcommand of the glab GitLab CLI tool, enabling seamless management of releases directly from the terminal. It supports creating releases tied to git tags, listing all project releases, viewing detailed information, editing existing releases, and deleting them. Key features include attaching assets (files or links), associating milestones, setting draft status, and specifying custom targets like branches or commits.

Releases enhance project visibility by bundling changelogs, binaries, and notes. The command authenticates via glab auth login, using personal access tokens or deploy keys. It detects the current repository context or allows targeting via -R flag. Ideal for CI/CD pipelines, it automates release workflows without browser interaction.

Common workflow: Tag a commit, then glab release create v1.0.0 --title 'v1.0.0' --description @CHANGELOG.md. Supports Markdown in descriptions and multiple assets.

CAVEATS

Requires git tag to exist for create; needs maintainer/owner role; assets-files require write access; large files may timeout.

EXAMPLES

glab release create v1.0.0 --title 'Release v1.0.0' --assets-links https://example.com/download
glab release list --limit 5
glab release edit v1.0.0 --description @notes.md

AUTHENTICATION

Run glab auth login first; supports GitLab.com, self-hosted instances.

HISTORY

Part of glab CLI, first released by GitLab.org in 2020 (v1.0.0); actively maintained with GitLab API v4 parity; latest features track GitLab 17.x releases.

SEE ALSO

gh release(1), git tag(1), glab mr(1)

Copied to clipboard