instance and clean up build job

This commit is contained in:
Cat Flynn 2021-02-01 13:30:56 +00:00
parent 2b0b48663a
commit 90d1944d6e
1 changed files with 9 additions and 2 deletions

View File

@ -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"