diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f5123f9ec8..8214728971 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,6 +38,7 @@ before_script: include: - local: .gitlab/CI/recompile.yml + - local: .gitlab/CI/release.yml - local: .gitlab/CI/optional-builds.gitlab-ci.yml - local: .gitlab/CI/check-compile.gitlab-ci.yml - local: .gitlab/CI/build-post.gitlab-ci.yml diff --git a/.gitlab/CI/build-post.gitlab-ci.yml b/.gitlab/CI/build-post.gitlab-ci.yml index 89f2bb87b5..eae36a0662 100644 --- a/.gitlab/CI/build-post.gitlab-ci.yml +++ b/.gitlab/CI/build-post.gitlab-ci.yml @@ -39,9 +39,8 @@ localization-status: # Artifacts .artifact: &artifact extends: .recompile + extends: .release stage: build-post - rules: - - if: $CI_COMMIT_REF_NAME =~ /^master.$/ || $CI_COMMIT_TAG =~ /^r[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+/ tags: - veloren-docker diff --git a/.gitlab/CI/publish.gitlab-ci.yml b/.gitlab/CI/publish.gitlab-ci.yml index d2398f4cf5..bc3e1cd111 100644 --- a/.gitlab/CI/publish.gitlab-ci.yml +++ b/.gitlab/CI/publish.gitlab-ci.yml @@ -1,7 +1,6 @@ docker: stage: publish - when: delayed - start_in: 5 seconds + extends: .release image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""] @@ -9,11 +8,6 @@ docker: - linux before_script: - ls "$CI_PROJECT_DIR/server-cli/" - only: - refs: - - /^r[0-9]+\.[0-9]+\.[0-9]+/ - - /^v[0-9]+\.[0-9]+/ - - /^master$/ tags: - veloren-docker script: diff --git a/.gitlab/CI/release.yml b/.gitlab/CI/release.yml new file mode 100644 index 0000000000..5ac30a823f --- /dev/null +++ b/.gitlab/CI/release.yml @@ -0,0 +1,4 @@ +# Template to only run if pushes to master or a tag happened +.release: + rules: + - if: $CI_COMMIT_REF_NAME =~ /^master.$/ || $CI_COMMIT_TAG =~ /^r[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+/