From 90a87c58741b3cdeee87a3c162cd10ddef59adaf Mon Sep 17 00:00:00 2001 From: alteregoart <41084168+alteregoart@users.noreply.github.com> Date: Tue, 19 Oct 2021 20:12:57 +0200 Subject: [PATCH] docs(readme): add GitLab CI/CD section to README.md (#24) Co-authored-by: Arthur Dion --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index 6e4b2ee2..e5a3da1b 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ - [Examples](#examples) - [Docker](#docker) - [GitHub Action](#github-action) +- [GitLab CI/CD](#gitlab-ci) - [Configuration File](#configuration-file) - [changelog](#changelog) - [header](#header) @@ -273,6 +274,30 @@ See the [repository](https://github.com/orhun/git-cliff-action) for other [examp Also, see the [continuous deployment workflow](./.github/workflows/cd.yml) of this project which sets the release notes for GitHub releases using this action. +## GitLab CI/CD + +It is possible to generate changelogs using [GitLab CI/CD](https://docs.gitlab.com/ee/ci/). + +This minimal example creates artifacts that can be use on another job. + +```yml +- changelog: + image: + name: orhunp/git-cliff:latest + entrypoint: [""] + variables: + GIT_STRATEGY: clone # clone entire repo instead of reusing workspace + GIT_DEPTH: 0 # avoid shallow clone to give cliff all the info it needs + stage: doc + script: + - git-cliff -r . > CHANGELOG.md + artifacts: + paths: + - CHANGELOG.md +``` + +Please note that the stage is `doc` and has to be changed accordingly to your need. + ## Configuration File **git-cliff** configuration file supports [TOML](https://github.com/toml-lang/toml) (preferred) and [YAML](https://yaml.org) formats.