From 8fd9bf1b71854f47798acba982c861882f3091c4 Mon Sep 17 00:00:00 2001 From: jem Date: Tue, 1 Feb 2022 18:47:54 +0100 Subject: [PATCH] reorder gitlab ci --- .gitlab-ci.yml | 49 +++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 42fb489..7840e6a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -54,32 +54,6 @@ test: reports: junit: build/test-results/test/TEST-*.xml - -publish-snapshot-lib: - stage: publish - rules: - - if: $CI_COMMIT_TAG !~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/ - script: - - ./gradlew -x assemble -x test jar - - ./gradlew -x assemble -x test publish - artifacts: - paths: - - build/libs/*.jar - -publish-released-lib: - stage: publish - rules: - - if: $CI_PIPELINE_SOURCE != "push" - when: never - - if: $CI_COMMIT_TAG =~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/ - script: - - ./gradlew -x assemble -x test jar - - ./gradlew -x assemble -x test publish - artifacts: - paths: - - build/libs/*.jar - - .fatjars: stage: package rules: @@ -127,6 +101,29 @@ uberjarjar: - 'build/libs/sha512sum.lst' expire_in: never +publish-snapshot-lib: + stage: publish + rules: + - if: $CI_COMMIT_TAG !~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/ + script: + - ./gradlew -x assemble -x test jar + - ./gradlew -x assemble -x test publish + artifacts: + paths: + - build/libs/*.jar + +publish-released-lib: + stage: publish + rules: + - if: $CI_PIPELINE_SOURCE != "push" + when: never + - if: $CI_COMMIT_TAG =~ /^release-[0-9]+[.][0-9]+([.][0-9]+)?$/ + script: + - ./gradlew -x assemble -x test jar + - ./gradlew -x assemble -x test publish + artifacts: + paths: + - build/libs/*.jar release: image: registry.gitlab.com/gitlab-org/release-cli:latest