GitLab Release CLI tool
The release-cli
is in maintenance mode.
The release-cli
does not accept new features.
All new feature development happens in the glab
CLI,
so you should use the glab
CLI whenever possible.
The release-cli
is in maintenance mode, and issue cli#7450 proposes to deprecate it as the glab
CLI matures.
The GitLab Release CLI (release-cli
)
is a command-line tool for managing releases from the command line or from a CI/CD pipeline.
You can use the release CLI to create, update, modify, and delete releases.
When you use a CI/CD job to create a release,
the release
keyword entries are transformed into Bash commands and sent to the Docker
container containing the release-cli
tool. The tool then creates the release.
You can also call the release-cli
tool directly from a script
.
For example:
release-cli create --name "Release $CI_COMMIT_SHA" --description \
"Created using the release-cli $EXTRA_DESCRIPTION" \
--tag-name "v${MAJOR}.${MINOR}.${REVISION}" --ref "$CI_COMMIT_SHA" \
--released-at "2020-07-15T08:00:00Z" --milestone "m1" --milestone "m2" --milestone "m3" \
--assets-link "{\"name\":\"asset1\",\"url\":\"https://example.com/assets/1\",\"link_type\":\"other\"}"
Install the release-cli
for the Shell executor
- Tier: Free, Premium, Ultimate
- Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
The release-cli
binaries are available in the package registry.
When you use a runner with the Shell executor, you can download and install
the release-cli
manually for your supported OS and architecture.
Once installed, the release
keyword is available to use in your CI/CD jobs.
Install on Unix/Linux
Download the binary for your system from the GitLab package registry. For example, if you use an amd64 system:
curl --location --output /usr/local/bin/release-cli "https://gitlab.com/api/v4/projects/gitlab-org%2Frelease-cli/packages/generic/release-cli/latest/release-cli-linux-amd64"
Give it permissions to execute:
sudo chmod +x /usr/local/bin/release-cli
Verify
release-cli
is available:$ release-cli -v release-cli version 0.15.0
Install on Windows PowerShell
Create a folder somewhere in your system, for example
C:\GitLab\Release-CLI\bin
New-Item -Path 'C:\GitLab\Release-CLI\bin' -ItemType Directory
Download the executable file:
PS C:\> Invoke-WebRequest -Uri "https://gitlab.com/api/v4/projects/gitlab-org%2Frelease-cli/packages/generic/release-cli/latest/release-cli-windows-amd64.exe" -OutFile "C:\GitLab\Release-CLI\bin\release-cli.exe" Directory: C:\GitLab\Release-CLI Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 3/16/2021 4:17 AM bin
Add the directory to your
$env:PATH
:$env:PATH += ";C:\GitLab\Release-CLI\bin"
Verify
release-cli
is available:PS C:\> release-cli -v release-cli version 0.15.0
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support