Skip to content

Read release description from file if present

Allows specifying a file inside the current working directory ($CI_PROJECT_DIR) to read for the release description, either via the release-cli tool or in .gitlab-ci.yml in the release:description: node.

Usage in .gitlab-ci.yml:

release:
  stage: release
  script: echo "Creating new release"
  release:
    tag: v1.0.0
    name: "Release v1.0.0"
    description: description.txt

Usage in CLI:

release-cli create --name "Release v1.0.0" --description "description.txt" --tag-name "v1.0.0" ...

This has the following behavior:

  • if the description contains spaces between words: it is treated as a string,
  • if the description is a single word and is a file or a symlink to a file inside $CI_PROJECT_DIR: the file's contents will be read as the release description,
  • if the description is a single word and is a file or a symlink to a file outside $CI_PROJECT_DIR, or if the target file does not exist: it is treated as a string.

Closes #14 (closed).

Edited by Jaime Martinez

Merge request reports

Loading