From ec76ba075f18cede755d2f70c3a869c18c283fad Mon Sep 17 00:00:00 2001 From: icex2 Date: Thu, 7 Jan 2021 20:30:09 +0000 Subject: [PATCH] gitlab-ci: Fix pipeline to include build step for tagged release --- .gitlab-ci.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2f2ae1..817b1a5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ stages: - build - upload-release -build: +build-master: stage: build before_script: - apk update && apk add make > /dev/null @@ -28,19 +28,28 @@ build: refs: - master +build-tags: + stage: build + before_script: + - apk update && apk add make > /dev/null + script: + - make build-docker + - mv build/docker/bemanitools.zip bemanitools.zip + artifacts: + name: "$CI_COMMIT_SHORT_SHA-$CI_JOB_NAME" + paths: + - bemanitools.zip + only: + - tags + upload-release: stage: upload-release dependencies: - - build + - build-tags before_script: - apk update && apk add curl > /dev/null script: - - ls -la ./ - echo "Uploading ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}..." - - | - curl --silent --show-error \ - -F "key=${CI_UPLOAD_KEY}" \ - -F "filename=${CI_PROJECT_NAME}-v${CI_COMMIT_TAG}.zip" \ - -F "file=@./bemanitools.zip" ${CI_UPLOAD_URL} + - curl --silent --show-error -F "key=${CI_UPLOAD_KEY}" -F "filename=${CI_PROJECT_NAME}-v${CI_COMMIT_TAG}.zip" -F "file=@./bemanitools.zip" ${CI_UPLOAD_URL} only: - - tags \ No newline at end of file + - tags