Releases


Releases

Pipeline jobs can create releases

…by adding the release keyword

Release assets can be linked but must be stored elsewhere

release-cli required

release-cli must be available

Container images are publicly available

registry.gitlab.com/gitlab-org/release-cli:v0.14.0

Runners using the shell executor must have release-cli installed

See official documentation


Hands-On

See chapter Releases


Pro tip: Publish asset in package registry 1/

Release binaries can be published to generic package registry

Base URL for package registry: https://gitlab.inmylab.de/api/v4/projects/<PROJECT-ID>/packages/generic/

Use $CI_JOB_TOKEN to authenticate


Pro tip: Publish asset in package registry 2/2

Upload a file

Upload file file.txt to package my_package with version 0.0.1

curl --header "PRIVATE-TOKEN: ${CI_JOB_TOKEN}" \
    --upload-file file.txt \
    "https://gitlab.inmylab.de/api/v4/projects/<PROJECT-ID>/packages/generic/my_package/0.0.1/file.txt"

Download a file

Download file file.txt from package my_package with version 0.0.1

curl --header "PRIVATE-TOKEN: ${CI_JOB_TOKEN}" \
    "https://gitlab.inmylab.de/api/v4/projects/<PROJECT-ID>/packages/generic/my_package/0.0.1/file.txt"