fuzzyworld

godot-shooter / commit

Experimenting with exporting all platforms in GitLab. Prepare for pasta time, but also for the possibility of the game being available in a GitLabs page.

169b896b6f1554ed72253bfc749e5b873294e014 · Pavel Safronov · 2023-10-31 10:18:45 -0700 · parents 614e7fb1cd40

Experimenting with exporting all platforms in GitLab. Prepare for pasta time, but also for the possibility of the game being available in a GitLabs page.
 .gitignore         |  2 ++
 .gitlab-ci.yaml    | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 export_presets.cfg | 34 +++++++++++++++++++++++++++
 project.godot      |  1 +
 4 files changed, 105 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0b1d5db
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+# output directory
+out/
\ No newline at end of file
diff --git a/.gitlab-ci.yaml b/.gitlab-ci.yaml
new file mode 100644
index 0000000..8f843ec
--- /dev/null
+++ b/.gitlab-ci.yaml
@@ -0,0 +1,68 @@
+# modified from https://github.com/Razzlegames/GodotTutorialsPlatformer/blob/GitlabCiTutorial/.gitlab-ci.yml
+
+image: barichello/godot-ci:latest
+
+variables:
+  EXPORT_NAME: "shooter"
+
+stages:
+  - export
+  - deploy
+
+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:
+    - cd Godot
+    - godot -v --export "Linux/X11" ../build/linux/$EXPORT_NAME.x86_64
+    - test -e ../build/linux/$EXPORT_NAME.x86_64
+  artifacts:
+    name: $EXPORT_NAME-$CI_JOB_NAME
+    paths:
+      - build/linux
+  only:
+      - release
+
+windows:
+  stage: export
+  script:
+    - cd Godot
+    - godot -v --export "Windows Desktop" ../build/windows/$EXPORT_NAME.exe
+    - test -e ../build/windows/$EXPORT_NAME.exe
+  artifacts:
+    name: $EXPORT_NAME-$CI_JOB_NAME
+    paths:
+      - build/windows
+  only:
+      - release
+
+mac:
+  stage: export
+  script:
+    - cd Godot
+    - godot -v --export "Mac OSX" ../build/mac/$EXPORT_NAME.zip
+    - test -e ../build/mac/$EXPORT_NAME.zip
+  artifacts:
+    name: $EXPORT_NAME-$CI_JOB_NAME
+    paths:
+      - build/mac
+  only:
+      - release
+
+web:
+  stage: export
+  script:
+    - cd Godot
+    - godot -v --path Godot --export "HTML5" ../build/web/index.html
+    - test -e ../build/web/index.html
+  artifacts:
+    name: $EXPORT_NAME-$CI_JOB_NAME
+    paths:
+      - build/web
+  only:
+      - release
diff --git a/export_presets.cfg b/export_presets.cfg
new file mode 100644
index 0000000..8c4868a
--- /dev/null
+++ b/export_presets.cfg
@@ -0,0 +1,34 @@
+[preset.0]
+
+name="HTML5"
+platform="HTML5"
+runnable=true
+custom_features=""
+export_filter="all_resources"
+include_filter=""
+exclude_filter=""
+export_path="out/index.html"
+script_export_mode=1
+script_encryption_key=""
+
+[preset.0.options]
+
+custom_template/debug=""
+custom_template/release=""
+variant/export_type=0
+vram_texture_compression/for_desktop=true
+vram_texture_compression/for_mobile=true
+html/export_icon=true
+html/custom_html_shell=""
+html/head_include=""
+html/canvas_resize_policy=2
+html/focus_canvas_on_start=true
+html/experimental_virtual_keyboard=false
+progressive_web_app/enabled=false
+progressive_web_app/offline_page=""
+progressive_web_app/display=1
+progressive_web_app/orientation=0
+progressive_web_app/icon_144x144=""
+progressive_web_app/icon_180x180=""
+progressive_web_app/icon_512x512=""
+progressive_web_app/background_color=Color( 0, 0, 0, 1 )
diff --git a/project.godot b/project.godot
index ecee060..91d187f 100644
--- a/project.godot
+++ b/project.godot
@@ -64,4 +64,5 @@ common/enable_pause_aware_picking=true
 [rendering]
 
 quality/driver/driver_name="GLES2"
+vram_compression/import_etc=true
 environment/default_environment="res://default_env.tres"