Skip to content

rename gitlab-ci.yml #1

rename gitlab-ci.yml

rename gitlab-ci.yml #1

Workflow file for this run

image: barichello/godot-ci:4.3
# NOTE: If your `project.godot` is at the repository root, set `PROJECT_PATH` below to ".".
# Cache imported assets between runs
cache:
key: import-assets
paths:
- .godot/imported/
stages:
- import-assets
- export
- deploy
variables:
EXPORT_NAME: Chronominions
PROJECT_PATH: .
# Open the editor to import assets in case the cache was empty or outdated
import-assets:
stage: import-assets
script:
- godot --headless --verbose --editor --quit
linux:
stage: export
script:
- mkdir -v -p build/linux
- EXPORT_DIR="$(readlink -f build)"
- cd $PROJECT_PATH
- godot --headless --verbose --export-release "Linux" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
artifacts:
name: $EXPORT_NAME-$CI_JOB_NAME
paths:
- build/linux
windows:
stage: export
script:
- mkdir -v -p build/windows
- EXPORT_DIR="$(readlink -f build)"
- cd $PROJECT_PATH
- godot --headless --verbose --export-release "Windows Desktop" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
artifacts:
name: $EXPORT_NAME-$CI_JOB_NAME
paths:
- build/windows
mac:
stage: export
script:
- mkdir -v -p build/mac
- EXPORT_DIR="$(readlink -f build)"
- cd $PROJECT_PATH
- godot --headless --verbose --export-release "macOS" "$EXPORT_DIR/mac/$EXPORT_NAME.zip"
artifacts:
name: $EXPORT_NAME-$CI_JOB_NAME
paths:
- build/mac
web:
stage: export
script:
- mkdir -v -p build/web
- EXPORT_DIR="$(readlink -f build)"
- cd $PROJECT_PATH
- godot --headless --verbose --export-release "Web" "$EXPORT_DIR/web/index.html"
artifacts:
name: $EXPORT_NAME-$CI_JOB_NAME
paths:
- build/web
# GitHub Pages Deploy
# deploy-github-pages:
# stage: deploy
# dependencies:
# - web
# script:
# # This ensures the `gh-pages` branch is available.
# - git fetch
# - git checkout gh-pages
# - rm -f *.md
# - mv build/web/** .
# - git config user.email $GIT_EMAIL
# - git config user.name $GIT_USERNAME
# - git remote add github $REMOTE_URL
# - git add -A
# - 'git commit -m "ci: Deploy GitHub Page | $EXPORT_NAME:$CI_JOB_NAME" -m "Deploy from GitLab pipeline #$CI_PIPELINE_ID" || true'
# - git push github gh-pages -f
# Itch.io Deploy
itchio:linux:
stage: deploy
script:
- butler push ./build/linux $ITCHIO_USERNAME/$ITCHIO_GAME:linux
dependencies:
- linux
itchio:windows:
stage: deploy
script:
- butler push ./build/windows $ITCHIO_USERNAME/$ITCHIO_GAME:windows
dependencies:
- windows
itchio:macosx:
stage: deploy
script:
- butler push ./build/mac $ITCHIO_USERNAME/$ITCHIO_GAME:mac
dependencies:
- mac
itchio:web:
stage: deploy
script:
- butler push ./build/web $ITCHIO_USERNAME/$ITCHIO_GAME:web
dependencies:
- web