This will cache the imported files between each run. This massively speeds up the export stage for big projects. Note that this will save the cache *after* a stage is done, so if you add new files it will still import them once for each platform (but will not import them again in the future, which is what matter).
112 lines
2.2 KiB
YAML
112 lines
2.2 KiB
YAML
image: barichello/godot-ci:3.2.1
|
||
|
||
# Cache imported assets between runs
|
||
cache:
|
||
key: import-assets
|
||
paths:
|
||
- .import/
|
||
|
||
stages:
|
||
- export
|
||
- deploy
|
||
|
||
variables:
|
||
EXPORT_NAME: game-off
|
||
|
||
before_script:
|
||
- mkdir -v -p build/linux
|
||
- mkdir -v -p build/windows
|
||
- mkdir -v -p build/mac
|
||
- mkdir -v -p build/web
|
||
|
||
linux:
|
||
stage: export
|
||
script:
|
||
- godot -v --export "Linux/X11" ./build/linux/$EXPORT_NAME.x86_64
|
||
artifacts:
|
||
name: $EXPORT_NAME-$CI_JOB_NAME
|
||
paths:
|
||
- build/linux
|
||
|
||
windows:
|
||
stage: export
|
||
script:
|
||
- godot -v --export "Windows Desktop" ./build/windows/$EXPORT_NAME.exe
|
||
artifacts:
|
||
name: $EXPORT_NAME-$CI_JOB_NAME
|
||
paths:
|
||
- build/windows
|
||
|
||
mac:
|
||
stage: export
|
||
script:
|
||
- godot -v --export "Mac OSX" ./build/mac/$EXPORT_NAME.zip
|
||
artifacts:
|
||
name: $EXPORT_NAME-$CI_JOB_NAME
|
||
paths:
|
||
- build/mac
|
||
|
||
web:
|
||
stage: export
|
||
script:
|
||
- godot -v --export "HTML5" ./build/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
|
||
|
||
# GitLab Pages Deploy
|
||
pages:
|
||
stage: deploy
|
||
dependencies:
|
||
- web
|
||
script:
|
||
# This ensures the `pages` branch is available.
|
||
- git fetch
|
||
- git checkout pages
|
||
- rm -f *.md
|
||
- mv build/web/** ./public
|
||
artifacts:
|
||
paths:
|
||
- public
|
||
|
||
# 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
|