From 90d1944d6ee31498eff1bec4a1cc2f615b0e864f Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Mon, 1 Feb 2021 13:30:56 +0000 Subject: [PATCH] instance and clean up build job --- .gitlab-ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 31e0733..ee0c720 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,25 +4,31 @@ stages: variables: GIT_STRATEGY: fetch - GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PIPELINE_ID UNITY_VERSION: 2020.2.2f1 SRC_DIR: ./game BUILD_DIR: ./game/Build DEV_BRANCH: feature/cd + PROD_BRANCH: feature/cd-2 build: stage: build + variables: + # instance + GIT_CLONE_PATH: $CI_BUILDS_DIR/$RUNNER_SHORT_TOKEN/$CI_PROJECT_NAME-$CI_JOB_ID script: - echo "cloned to $GIT_CLONE_PATH" - chmod +x ./ci/build.sh - ./ci/build.sh $UNITY_VERSION + after_script: + - rm -r $GIT_CLONE_PATH artifacts: name: $CI_PROJECT_NAME-$CI_PIPELINE_ID paths: - $BUILD_DIR +# deploy to internal testing track deploy-dev: stage: deploy rules: @@ -37,10 +43,11 @@ deploy-dev: dependencies: - build +# deploy to production deploy-release: stage: deploy rules: - - if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH != $DEV_BRANCH + - if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == $PROD_BRANCH variables: ITCH_USER: "cyndrdev" ITCH_GAME: "revival"