diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..ca405017 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,64 @@ +image: barichello/godot-ci:mono-4.4 + +# 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: Cirno_No_Reason + 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 + +# 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 +