only build on main branch

This commit is contained in:
Cat Flynn 2021-01-29 17:35:49 +00:00
parent 17e756f1cc
commit 9d2f1252ef
1 changed files with 38 additions and 36 deletions

View File

@ -1,36 +1,38 @@
stages: stages:
- build - build
- deploy - deploy
variables: variables:
GIT_STRATEGY: fetch GIT_STRATEGY: fetch
UNITY_VERSION: 2020.2.2f1 UNITY_VERSION: 2020.2.2f1
SRC_DIR: ./game SRC_DIR: ./game
BUILD_DIR: ./game/Build BUILD_DIR: ./game/Build
build: build:
stage: build stage: build
script: script:
- chmod +x ./ci/build.sh - chmod +x ./ci/build.sh
- ./ci/build.sh $UNITY_VERSION - ./ci/build.sh $UNITY_VERSION
artifacts: artifacts:
name: $CI_PROJECT_NAME-$CI_PIPELINE_ID name: $CI_PROJECT_NAME-$CI_PIPELINE_ID
paths: paths:
- $BUILD_DIR - $BUILD_DIR
.deploy: &deploy .deploy: &deploy
stage: deploy stage: deploy
dependencies: dependencies:
- build - build
deploy-dev: deploy-dev:
<<: *deploy <<: *deploy
variables: rules:
ITCH_USER: "cyndrdev" - if: $CI_COMMIT_BRANCH == "main"
ITCH_GAME: "revival-internal-track" variables:
ITCH_TRACK: "windows-unstable" ITCH_USER: "cyndrdev"
script: ITCH_GAME: "revival-internal-track"
- chmod +x ./ci/deploy.sh ITCH_TRACK: "windows-unstable"
- ./ci/deploy.sh $BUILD_DIR $ITCH_USER $ITCH_GAME $ITCH_TRACK script:
- chmod +x ./ci/deploy.sh
- ./ci/deploy.sh $BUILD_DIR $ITCH_USER $ITCH_GAME $ITCH_TRACK