From 8301fb17fb8dc8160bfcad464a1c53d73f1df961 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 9 Jan 2021 18:47:20 +0100 Subject: [PATCH] add minor and major release jobs --- .gitlab-ci.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b13b711..0cd248e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,13 +68,11 @@ deploy: - master resource_group: production -release-patch: +.release-template: &release-template stage: release before_script: - apt update - apt install --yes jq - variables: - RELEASE_TYPE: patch cache: <<: *global_cache script: | @@ -88,7 +86,7 @@ release-patch: RELEASE_VERSION=$(jq -r '.version' < package.json) git add package.json package-lock.json src/system.json git --no-pager diff - git commit -m "release version ${VERSION}" + git commit -m "release version ${RELEASE_VERSION}" git tag -f latest git tag -f ${RELEASE_VERSION} # git push origin ci-processing:${CI_BUILD_REF_NAME} @@ -97,3 +95,18 @@ release-patch: # only: # - master when: manual + +release-patch: + variables: + RELEASE_TYPE: patch + <<: *release-template + +release-minor: + variables: + RELEASE_TYPE: patch + <<: *release-template + +release-major: + variables: + RELEASE_TYPE: patch + <<: *release-template