From 7979fcb1210208cee7166da8bda3ad60e596a281 Mon Sep 17 00:00:00 2001 From: Slava Date: Sat, 26 Aug 2023 21:18:07 +0000 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab0e58d..26ff1ed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,21 +21,22 @@ stages: # List of stages for jobs, and their order of execution release_job: - stage: release # It only runs when *both* jobs in the test stage complete successfully. - image: registry.gitlab.com/gitlab-org/release-cli:latest - script: - - echo "Release WPE 2.0_$CI_COMMIT_SHORT_SHA" - - rm .gitlab-ci.yml - - rm CHANGELOG - - rm README.md - except: - refs: - - tags + rules: + - if: $CI_COMMIT_TAG + when: never # Do not run this job when a tag is created manually + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + stage: release # It only runs when *both* jobs in the test stage complete successfully. + image: registry.gitlab.com/gitlab-org/release-cli:latest + script: + - echo "Release WPE 2.0_$CI_COMMIT_SHORT_SHA" + - rm .gitlab-ci.yml + - rm CHANGELOG + - rm README.md - release: - # tag_name: $CI_COMMIT_SHORT_SHA - name: 'WPE 2.0_$CI_COMMIT_SHORT_SHA' - description: '$CI_COMMIT_MESSAGE' \ No newline at end of file + release: + tag_name: $CI_COMMIT_SHORT_SHA + name: 'WPE 2.0_$CI_COMMIT_SHORT_SHA' + description: '$CI_COMMIT_MESSAGE' \ No newline at end of file