From a1cc6fdfbbf5f5a1062dae7e4ee275d09d66a4eb Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Sun, 22 Sep 2024 09:20:22 +0200 Subject: [PATCH] ci: update prepare_release to use git-cliff for CHANGELOG generation --- .gitlab-ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fe0aeba..d9c958f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,15 +21,18 @@ build: - push prepare_release: - image: node:20 stage: prepare - before_script: - - npm install -g conventional-changelog-cli + 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 script: - - conventional-changelog -p conventionalcommits > ./release.description + - git-cliff --current > CHANGELOG.md artifacts: paths: - - release.description + - CHANGELOG.md rules: - if: $CI_COMMIT_TAG @@ -43,6 +46,6 @@ release: - echo "Running release_job for $TAG" release: tag_name: '$CI_COMMIT_TAG' - description: ./release.description + description: ./CHANGELOG.md rules: - if: $CI_COMMIT_TAG