mw gitlab release create
Releasev0.35.0 · cfeceb67
mw gitlab release create <tag> [<files>...] [flags]Create a new GitLab release for a repository, or update an existing one. Requires at least the Developer role.
An existing release is updated with the new information you provide.
To create a release from an annotated Git tag:
-
Create the tag locally with Git, and push the tag to GitLab.
-
Run this command.
-
If the Git tag you specify doesn’t exist, the command creates a release from the latest state of the default branch, and tags it with the tag name you specify.
To override this behavior, use
--ref. Therefcan be a commit SHA, another tag name, or a branch name. -
Optional. To fetch the new tag locally after the release, run
git fetch --tags origin.
Options
Section titled “Options”Global options
Section titled “Global options”Examples
Section titled “Examples”# Create a release interactively$ glab release create v1.0.1
# Create a release non-interactively by specifying a note$ glab release create v1.0.1 --notes "bugfix release"
# Use release notes from a file$ glab release create v1.0.1 -F changelog.md
# Upload a release asset with a display name (type will default to 'other')$ glab release create v1.0.1 '/path/to/asset.zip#My display label'
# Upload a release asset with a display name and type$ glab release create v1.0.1 '/path/to/asset.png#My display label#image'
# Upload all assets in a specified folder (types default to 'other')$ glab release create v1.0.1 ./dist/*
# Upload all tarballs in a specified folder (types default to 'other')$ glab release create v1.0.1 ./dist/*.tar.gz
# Create a release with assets specified as JSON object$ glab release create v1.0.1 --assets-links='[{"name": "Asset1","url":"https://<domain>/some/location/1","link_type": "other","direct_asset_path": "path/to/file"}]'
# (EXPERIMENTAL) Create a release and publish it to the GitLab CI/CD catalog# Requires the feature flag `ci_release_cli_catalog_publish_option` to be enabled# for this project in your GitLab instance. Do NOT run this manually. Use it as part# of a CI/CD pipeline with the "release" keyword:## - It retrieves components from the current repository by searching for# `yml` files within the "templates" directory and its subdirectories.# - It fails if the feature flag `ci_release_cli_catalog_publish_option`# is not enabled for this project in your GitLab instance.
# Components can be defined:
# - In single files ending in `.yml` for each component, like `templates/secret-detection.yml`.# - In subdirectories containing `template.yml` files as entry points,# for components that bundle together multiple related files. For example,# `templates/secret-detection/template.yml`.
$ glab release create v1.0.1 --publish-to-catalogSee also
Section titled “See also”Page views: —Sessions: —