From 9d2f1252ef46cd8db6714f5aaacc69009a9ba85c Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Fri, 29 Jan 2021 17:35:49 +0000 Subject: [PATCH] only build on main branch --- .gitlab-ci.yml | 74 ++++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1a1f29..b21e44a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,36 +1,38 @@ -stages: -- build -- deploy - -variables: - GIT_STRATEGY: fetch - - UNITY_VERSION: 2020.2.2f1 - - SRC_DIR: ./game - BUILD_DIR: ./game/Build - -build: - stage: build - script: - - chmod +x ./ci/build.sh - - ./ci/build.sh $UNITY_VERSION - artifacts: - name: $CI_PROJECT_NAME-$CI_PIPELINE_ID - paths: - - $BUILD_DIR - -.deploy: &deploy - stage: deploy - dependencies: - - build - -deploy-dev: - <<: *deploy - variables: - ITCH_USER: "cyndrdev" - ITCH_GAME: "revival-internal-track" - ITCH_TRACK: "windows-unstable" - script: - - chmod +x ./ci/deploy.sh - - ./ci/deploy.sh $BUILD_DIR $ITCH_USER $ITCH_GAME $ITCH_TRACK +stages: +- build +- deploy + +variables: + GIT_STRATEGY: fetch + + UNITY_VERSION: 2020.2.2f1 + + SRC_DIR: ./game + BUILD_DIR: ./game/Build + +build: + stage: build + script: + - chmod +x ./ci/build.sh + - ./ci/build.sh $UNITY_VERSION + artifacts: + name: $CI_PROJECT_NAME-$CI_PIPELINE_ID + paths: + - $BUILD_DIR + +.deploy: &deploy + stage: deploy + dependencies: + - build + +deploy-dev: + <<: *deploy + rules: + - if: $CI_COMMIT_BRANCH == "main" + variables: + ITCH_USER: "cyndrdev" + ITCH_GAME: "revival-internal-track" + ITCH_TRACK: "windows-unstable" + script: + - chmod +x ./ci/deploy.sh + - ./ci/deploy.sh $BUILD_DIR $ITCH_USER $ITCH_GAME $ITCH_TRACK