From d64de8fc85d28059dbc3264409c77d69b6150073 Mon Sep 17 00:00:00 2001 From: Michael Behrisch <m.behrisch@uu.nl> Date: Tue, 10 May 2022 20:26:26 +0200 Subject: [PATCH] chore: :zap: adds versioning stage with semver to bump version numbers The gitlab-ci has now a versioning stage to update the package.json version and adding a autogenerated changelog. This functionality is provided by semver https://github.com/jscutlery/semver --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3a29f10fe..d5f838709 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ image: node:16-alpine stages: - setup - test + - versioning - build - dockerize @@ -72,3 +73,23 @@ build-docker: # - docker push datastropheregistry.azurecr.io/$CI_PROJECT_NAME-webserver-service:$DOCKER_TAG dependencies: - build + +##################### +# STAGE: versioning # +##################### + +versioning: + image: node:13 + stage: versioning + only: + refs: + - release + - master + before_script: + # Skip before_script since we will not need the requirements + - '' + script: + - nx affected --target version + artifacts: + paths: + - CHANGELOG.md \ No newline at end of file -- GitLab