Skip to content

Create annotated tags in CI using the release:tag_message keyword

Alishan Ladhani requested to merge ali/ci-create-annotated-tags into master

What does this MR do and why?

This MR enables the creation of annotated tags in CI by optionally specifying tag_message under the release keyword.

Related to #363024 (closed)

Screenshots or screen recordings

The following job produces a lightweight tag:

release:
    stage: release
    image: registry.gitlab.com/gitlab-org/release-cli
    script:
        - echo "Creating release"
    release:
        tag_name: 'v0.0.1'
        description: 'Created with release keyword in .gitlab-ci.yml'

Screen_Shot_2022-07-20_at_9.45.11_PM

Adding the tag_message keyword causes the job to produce an annotated tag:

release:
    stage: release
    image: registry.gitlab.com/gitlab-org/release-cli
    script:
        - echo "Creating release"
    release:
        tag_name: 'v0.0.2'
        description: 'Created with release keyword in .gitlab-ci.yml'
        tag_message: 'Annotated tag created with release keyword in .gitlab-ci.yml'

Screen_Shot_2022-07-20_at_9.49.22_PM

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Alishan Ladhani

Merge request reports

Loading