From 41a16bebfec50520be7c7bae47225ef2b16a53fd Mon Sep 17 00:00:00 2001 From: Haze Snider Date: Wed, 18 Jan 2023 20:22:38 +0000 Subject: [PATCH] setup automatic builds when a tag is created --- .gitlab-ci.yml | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..eabc8c2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,77 @@ +image: barichello/godot-ci:3.5.1 + +stages: + - export + - deploy + +# keep imported assets between builds +cache: + key: imported-assets + paths: + - .import/ + +variables: + EXPORT_NAME: hero-mark-2 + +windows: + stage: export + rules: + - if: $CI_COMMIT_TAG + script: + - mkdir -v -p build/windows + - godot -v --export "windows" build/windows/$EXPORT_NAME.exe + artifacts: + name: $EXPORT_NAME-$CI_JOB_NAME + paths: + - build/windows + +linux: + stage: export + rules: + - if: $CI_COMMIT_TAG + script: + - mkdir -v -p build/linux + - godot -v --export "linux" build/linux/$EXPORT_NAME.x86_64 + artifacts: + name: $EXPORT_NAME-$CI_JOB_NAME + paths: + - build/linux + +html5: + stage: export + rules: + - if: $CI_COMMIT_TAG + script: + - mkdir -v -p build/html5 + - godot -v --export "html5" build/html5/index.html + artifacts: + name: $EXPORT_NAME-$CI_JOB_NAME + paths: + - build/html5 + +itchio:windows: + stage: deploy + dependencies: + - linux + rules: + - if: $CI_COMMIT_TAG + script: + - butler push ./build/windows $ITCHIO_USERNAME/$ITCHIO_GAME:windows-beta --userversion $CI_COMMIT_TAG + +itchio:linux: + stage: deploy + dependencies: + - linux + rules: + - if: $CI_COMMIT_TAG + script: + - butler push ./build/linux $ITCHIO_USERNAME/$ITCHIO_GAME:linux-beta --userversion $CI_COMMIT_TAG + +itchio:html5: + stage: deploy + dependencies: + - html5 + rules: + - if: $CI_COMMIT_TAG + script: + - butler push ./build/html5 $ITCHIO_USERNAME/$ITCHIO_GAME:html5-beta --userversion $CI_COMMIT_TAG \ No newline at end of file