From c58614d7ccea3462b62c51bfb7f547af2cc7fbcd Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Tue, 11 Jul 2023 07:09:26 +0000 Subject: chore: build release only on tags starting with eOS- --- .gitlab-ci.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d9574df..d7374aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,6 +77,8 @@ test-debug: rules: - if: '$CI_PIPELINE_SOURCE == "schedule"' when: never + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"' + when: always - if: '$CI_COMMIT_BRANCH == "main"' when: never - if: '$CI_COMMIT_REF_PROTECTED == "true"' @@ -88,22 +90,14 @@ test-debug: paths: - ./**/build/reports/tests/testDebugUnitTest -build-full: +build-e-release: stage: build script: - - ./gradlew :app:assembleRelease + - ./gradlew :app:assembleERelease rules: - - if: '$CI_PIPELINE_SOURCE == "schedule"' - when: never - - if: '$CI_COMMIT_BRANCH == "main"' + - if: '$CI_COMMIT_REF_PROTECTED == "true" && $CI_BUILD_TAG =~ /^eOS-/' variables: - MAPBOX_KEY: $MAPBOX_KEY_PROD - when: always - - if: '$CI_COMMIT_REF_PROTECTED == "true"' - variables: - MAPBOX_KEY: $MAPBOX_KEY_PROD - when: always - - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"' + MAPBOX_KEY: $MAPBOX_KEY_PROD when: always - when: never artifacts: -- cgit v1.2.1