From 5a30bc2f15c82779e4941fb993689c4c8dd56679 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 21 Nov 2022 12:00:08 +0100 Subject: [PATCH] Fix creating release and upload artefacts in CI on final releases Closes #1189 Signed-off-by: Thomas Citharel --- .gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e5a67443b..9e748a66e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -246,7 +246,7 @@ build-docker-main: # Don't push to latest when building beta/rc tags build-and-push-to-latest-docker-tag: <<: *docker - rules: &tag-rules + rules: &release-tag-rules - if: '$CI_PROJECT_NAMESPACE != "framasoft"' when: never - if: $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /alpha|beta|rc/ @@ -263,7 +263,7 @@ build-and-push-to-latest-docker-tag: build-and-push-docker-tag: <<: *docker - rules: &tag-rules + rules: &pre-release-tag-rules - if: '$CI_PROJECT_NAMESPACE != "framasoft"' when: never - if: $CI_COMMIT_TAG =~ /alpha|beta|rc/ @@ -369,7 +369,9 @@ release-upload: image: framasoft/upload-packages:latest variables: APP_ASSET: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_${ARCH}.tar.gz" - rules: *tag-rules + rules: + - if: '$CI_PROJECT_NAMESPACE != "framasoft"' + when: never script: - eval `ssh-agent -s` - ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i) @@ -387,7 +389,9 @@ release-upload: release-create: stage: deploy image: registry.gitlab.com/gitlab-org/release-cli:latest - rules: *tag-rules + rules: + - if: '$CI_PROJECT_NAMESPACE != "framasoft"' + when: never variables: APP_ASSET_AMD64: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_amd64.tar.gz" APP_ASSET_ARM: "${CI_PROJECT_NAME}_${CI_COMMIT_REF_NAME}_arm.tar.gz"