tools for exporting godot projects via Github Actions
first commit
bendn 2022-07-13
commit 109dd38
-rw-r--r--.github/actions/export-android/action.yml57
-rw-r--r--.github/actions/export-linux/action.yml19
-rw-r--r--.github/actions/export-mac/action.yml20
-rw-r--r--.github/actions/export-web/action.yml39
-rw-r--r--.github/actions/export-windows/action.yml20
-rw-r--r--.github/actions/itch-push/action.yml37
-rw-r--r--.github/actions/setup-godot/action.yml15
-rw-r--r--.github/editor-settings.tres136
-rw-r--r--.gitignore8
9 files changed, 351 insertions, 0 deletions
diff --git a/.github/actions/export-android/action.yml b/.github/actions/export-android/action.yml
new file mode 100644
index 0000000..40b7276
--- /dev/null
+++ b/.github/actions/export-android/action.yml
@@ -0,0 +1,57 @@
+name: Android export
+description: Android export
+
+inputs:
+ android-keystore-base64:
+ description: The base64 encoded keystore
+ required: false
+ android-password:
+ description: The password of the keystore
+ required: false
+ default: android
+
+runs:
+ using: composite
+ steps:
+ - name: Setup
+ uses: bend-n/godot-actions/.github/actions/setup-godot@main
+
+ - name: Setup editor settings
+ # the Dockerfile is supposed to do this for me *grumbles*
+ run: |
+ apt-get update && apt-get install -y curl
+ mkdir -vp ~/.config/godot
+ curl 'https://raw.githubusercontent.com/bend-n/godot-actions/main/.github/editor-settings.tres' --output ~/.config/godot/editor_settings-3.tres
+
+ # debug keystore is needed for release build /shrug
+ keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 && mv debug.keystore ~/debug.keystore
+ sed "s@export/android/debug_keystore = \"\"@export/android/debug_keystore = \"$HOME/debug.keystore\"@" -i ~/.config/godot/editor_settings-3.tres
+ shell: bash
+
+ - name: Build (release)
+ if: ${{ inputs.android-keystore-base64 }}
+ run: |
+ echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > ~/release.keystore
+ ANDROID_KEYSTORE_USER=$(keytool -storepass "$ANDROID_KEYSTORE_PASSWORD" -list -v -keystore ~/release.keystore | grep -E '^Alias name:\s*(.+)$' | cut -d ' ' -f 3-)
+ sed "s@keystore/release=\"\"@keystore/release=\"$HOME/release.keystore\"@g" -i export_presets.cfg
+ sed 's@keystore/release_user=".*"@keystore/release_user="'$ANDROID_KEYSTORE_USER'"@g' -i export_presets.cfg
+ sed 's@keystore/release_password=".*"@keystore/release_password="'$ANDROID_KEYSTORE_PASSWORD'"@g' -i export_presets.cfg
+ mkdir -vp build/android
+ godot -v --export "Android" ./build/android/$NAME.apk
+ env:
+ ANDROID_KEYSTORE_BASE64: ${{ inputs.android-keystore-base64 }}
+ ANDROID_KEYSTORE_PASSWORD: ${{ inputs.android-password }}
+ shell: bash
+
+ - name: Build (debug)
+ if: ${{ inputs.android-keystore-base64 }} == ""
+ run: |
+ mkdir -vp build/android || true
+ godot -v --export-debug "Android" ./build/android/$NAME.apk
+ shell: bash
+
+ - name: Upload
+ uses: actions/upload-artifact@v1
+ with:
+ name: android
+ path: build/android
diff --git a/.github/actions/export-linux/action.yml b/.github/actions/export-linux/action.yml
new file mode 100644
index 0000000..be36a1b
--- /dev/null
+++ b/.github/actions/export-linux/action.yml
@@ -0,0 +1,19 @@
+name: Linux export
+description: Linux export
+
+runs:
+ using: composite
+ steps:
+ - name: Setup
+ uses: bend-n/godot-actions/.github/actions/setup-godot@main
+
+ - name: Build
+ run: |
+ mkdir -vp build/linux
+ godot -v --export "Linux" ./build/linux/$NAME.x86_64
+ shell: bash
+
+ - uses: actions/upload-artifact@v1
+ with:
+ name: linux
+ path: build/linux
diff --git a/.github/actions/export-mac/action.yml b/.github/actions/export-mac/action.yml
new file mode 100644
index 0000000..fa88643
--- /dev/null
+++ b/.github/actions/export-mac/action.yml
@@ -0,0 +1,20 @@
+name: Mac export
+description: Mac export
+
+runs:
+ using: composite
+ steps:
+ - name: Setup
+ uses: bend-n/godot-actions/.github/actions/setup-godot@main
+
+ - name: Build
+ run: |
+ mkdir -vp build/mac
+ godot -v --export "Mac" ./build/mac/$NAME.zip
+ shell: bash
+
+ - name: Upload
+ uses: actions/upload-artifact@v1
+ with:
+ name: mac
+ path: build/mac
diff --git a/.github/actions/export-web/action.yml b/.github/actions/export-web/action.yml
new file mode 100644
index 0000000..74111d5
--- /dev/null
+++ b/.github/actions/export-web/action.yml
@@ -0,0 +1,39 @@
+name: Web export
+description: Web export
+
+inputs:
+ git-name:
+ description: Name of commiter
+ required: true
+ default: "bendn"
+ git-email:
+ description: Email of commiter
+ required: true
+ default: "[email protected]"
+
+runs:
+ using: composite
+ steps:
+ - name: Setup
+ uses: bend-n/godot-actions/.github/actions/setup-godot@main
+
+ - name: Build
+ run: |
+ mkdir -vp build/web
+ godot -v --export "HTML" ./build/web/index.html
+ shell: bash
+
+ - name: Upload
+ uses: actions/upload-artifact@v1
+ with:
+ name: web
+ path: build/web
+
+ - name: Deploy
+ uses: JamesIves/github-pages-deploy-action@releases/v4
+ with:
+ branch: gh-pages
+ folder: build/web
+ git-config-name: ${{ inputs.git-name }}
+ git-config-email: ${{ inputs.git-email }}
+ single-commit: true
diff --git a/.github/actions/export-windows/action.yml b/.github/actions/export-windows/action.yml
new file mode 100644
index 0000000..c5e0cf3
--- /dev/null
+++ b/.github/actions/export-windows/action.yml
@@ -0,0 +1,20 @@
+name: "Windows export"
+description: "Windows export"
+
+runs:
+ using: "composite"
+ steps:
+ - name: Setup
+ uses: bend-n/godot-actions/.github/actions/setup-godot@main
+
+ - name: Windows Build
+ run: |
+ mkdir -vp build/windows
+ godot -v --export "Windows" ./build/windows/$NAME.exe
+ shell: bash
+
+ - name: Upload
+ uses: actions/upload-artifact@v1
+ with:
+ name: windows
+ path: build/windows
diff --git a/.github/actions/itch-push/action.yml b/.github/actions/itch-push/action.yml
new file mode 100644
index 0000000..4b84f0e
--- /dev/null
+++ b/.github/actions/itch-push/action.yml
@@ -0,0 +1,37 @@
+name: Push to itch.io
+description: Push the created artifacts to itch.io
+
+inputs:
+ api-key:
+ description: The API key for the itch.io account
+ required: true
+ itch-path:
+ description: "The path to the itch.io project eg: leafo/x-moon"
+ required: false
+ default: ""
+
+runs:
+ using: composite
+ steps:
+ - name: Download
+ uses: actions/download-artifact@v3
+
+ - name: Setup butler
+ uses: jdno/setup-butler@v1
+
+ - name: Push
+ run: |
+ [[ -z $ITCH_PATH ]] && ITCH_PATH=bendn/$NAME
+ function push() {
+ channel=$1
+ [[ $channel == mac ]] && echo -e "#!/bin/bash\n"'cd "$(dirname "$0")"||exit;xattr -cr "$(pwd)/$NAME.app";open -n -a "$(pwd)/$NAME.app"' >./mac/run.sh
+ chmod +x **; to_push="$channel"
+ [[ $(find $channel -type f | wc -l) -eq 1 && $channel != "android" ]] && to_push="$(echo $(basename $channel/*) .7z | tr -d " ")" && (cd "$channel" && 7z a -mtm=off -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on "../$to_push" ./*)
+ butler push "$to_push" "$ITCH_PATH:$channel"
+ }
+ push "web"; push "linux"; push "windows"; unzip "mac/$NAME.zip" -d mac/ && rm "mac/$NAME.zip" && push "mac"
+ [[ -d android ]] && rm android/*.idsig && push "android"
+ env:
+ BUTLER_API_KEY: ${{ inputs.api-key }}
+ ITCH_PATH: ${{ inputs.itch-path }}
+ shell: bash
diff --git a/.github/actions/setup-godot/action.yml b/.github/actions/setup-godot/action.yml
new file mode 100644
index 0000000..6fd5bf2
--- /dev/null
+++ b/.github/actions/setup-godot/action.yml
@@ -0,0 +1,15 @@
+name: Setup
+description: Setup godot and repo
+
+runs:
+ using: "composite"
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ lfs: true
+ - name: Setup
+ run: |
+ mkdir -v -p ~/.local/share/godot/templates
+ mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
+ shell: bash
diff --git a/.github/editor-settings.tres b/.github/editor-settings.tres
new file mode 100644
index 0000000..e1be72f
--- /dev/null
+++ b/.github/editor-settings.tres
@@ -0,0 +1,136 @@
+[gd_resource type="EditorSettings" format=2]
+
+[resource]
+text_editor/highlighting/symbol_color = Color( 0.67, 0.785, 1, 1 )
+text_editor/highlighting/keyword_color = Color( 1, 0.44, 0.52, 1 )
+text_editor/highlighting/control_flow_keyword_color = Color( 1, 0.55, 0.8, 1 )
+text_editor/highlighting/base_type_color = Color( 0.26, 1, 0.76, 1 )
+text_editor/highlighting/engine_type_color = Color( 0.556, 1, 0.856, 1 )
+text_editor/highlighting/user_type_color = Color( 0.778, 1, 0.928, 1 )
+text_editor/highlighting/comment_color = Color( 0.8, 0.8075, 0.8275, 0.5 )
+text_editor/highlighting/string_color = Color( 1, 0.925, 0.63, 1 )
+text_editor/highlighting/background_color = Color( 0.125, 0.14375, 0.19375, 1 )
+text_editor/highlighting/completion_background_color = Color( 0.2, 0.23, 0.31, 1 )
+text_editor/highlighting/completion_selected_color = Color( 1, 1, 1, 0.07 )
+text_editor/highlighting/completion_existing_color = Color( 1, 1, 1, 0.14 )
+text_editor/highlighting/completion_scroll_color = Color( 1, 1, 1, 0.07 )
+text_editor/highlighting/completion_font_color = Color( 0.8, 0.8075, 0.8275, 1 )
+text_editor/highlighting/text_color = Color( 0.8, 0.8075, 0.8275, 1 )
+text_editor/highlighting/line_number_color = Color( 0.8, 0.8075, 0.8275, 0.5 )
+text_editor/highlighting/safe_line_number_color = Color( 0.8, 0.969, 0.8275, 0.75 )
+text_editor/highlighting/caret_color = Color( 1, 1, 1, 1 )
+text_editor/highlighting/text_selected_color = Color( 0.1, 0.115, 0.155, 1 )
+text_editor/highlighting/brace_mismatch_color = Color( 1, 0.47, 0.42, 1 )
+text_editor/highlighting/current_line_color = Color( 1, 1, 1, 0.07 )
+text_editor/highlighting/line_length_guideline_color = Color( 0.2, 0.23, 0.31, 1 )
+text_editor/highlighting/word_highlighted_color = Color( 1, 1, 1, 0.07 )
+text_editor/highlighting/number_color = Color( 0.63, 1, 0.88, 1 )
+text_editor/highlighting/function_color = Color( 0.34, 0.7, 1, 1 )
+text_editor/highlighting/member_variable_color = Color( 0.736, 0.88, 1, 1 )
+text_editor/highlighting/mark_color = Color( 1, 0.47, 0.42, 0.3 )
+text_editor/highlighting/breakpoint_color = Color( 1, 0.47, 0.42, 1 )
+text_editor/highlighting/code_folding_color = Color( 1, 1, 1, 0.7 )
+text_editor/highlighting/search_result_color = Color( 1, 1, 1, 0.07 )
+export/android/android_sdk_path = "/usr/lib/android-sdk"
+export/android/debug_keystore = ""
+export/android/debug_keystore_user = "androiddebugkey"
+export/android/debug_keystore_pass = "android"
+export/android/force_system_user = false
+export/android/shutdown_adb_on_exit = true
+export/web/http_host = "localhost"
+export/web/http_port = 8060
+export/web/use_ssl = false
+export/web/ssl_key = ""
+export/web/ssl_certificate = ""
+export/windows/rcedit = ""
+export/windows/osslsigncode = ""
+export/windows/wine = ""
+interface/scene_tabs/always_show_close_button = false
+interface/editor/save_on_focus_loss = false
+interface/editor/show_update_spinner = false
+interface/editor/update_continuously = false
+interface/scene_tabs/restore_scenes_on_load = false
+interface/inspector/capitalize_properties = true
+interface/inspector/default_float_step = 0.001
+interface/inspector/disable_folding = false
+interface/inspector/auto_unfold_foreign_scenes = true
+interface/inspector/horizontal_vector2_editing = false
+interface/inspector/horizontal_vector_types_editing = true
+interface/inspector/open_resources_in_current_inspector = true
+interface/inspector/resources_to_open_in_new_inspector = "Script,MeshLibrary,TileSet"
+interface/inspector/default_color_picker_mode = 0
+_default_feature_profile = ""
+interface/editors/show_scene_tree_root_selection = true
+interface/editors/derive_script_globals_by_name = true
+_use_favorites_root_selection = false
+filesystem/file_server/port = 6010
+filesystem/file_server/password = ""
+editors/3d/manipulator_gizmo_size = 80
+editors/3d/manipulator_gizmo_opacity = 0.9
+editors/3d/navigation/show_viewport_rotation_gizmo = true
+debugger/auto_switch_to_remote_scene_tree = false
+debugger/remote_scene_tree_refresh_interval = 1.0
+debugger/remote_inspect_refresh_interval = 0.2
+debugger/profiler_frame_history_size = 600
+debugger/profiler_frame_max_functions = 512
+text_editor/files/auto_reload_scripts_on_external_change = true
+text_editor/files/auto_reload_and_parse_scripts_on_save = true
+text_editor/files/open_dominant_script_on_scene_change = true
+text_editor/external/use_external_editor = false
+text_editor/external/exec_path = ""
+text_editor/script_list/script_temperature_enabled = true
+text_editor/script_list/highlight_current_script = true
+text_editor/script_list/script_temperature_history_size = 15
+text_editor/script_list/current_script_background_color = Color( 1, 1, 1, 0.3 )
+text_editor/script_list/group_help_pages = true
+text_editor/script_list/sort_scripts_by = 0
+text_editor/script_list/list_script_names_as = 0
+text_editor/external/exec_flags = "{file}"
+asset_library/available_urls = {
+"godotengine.org (Official)": "https://godotengine.org/asset-library/api"
+}
+asset_library/use_threads = true
+editors/grid_map/preview_size = 64
+editors/tile_map/preview_size = 64
+editors/tile_map/palette_item_hseparation = 8
+editors/tile_map/show_tile_names = true
+editors/tile_map/show_tile_ids = false
+editors/tile_map/sort_tiles_by_name = true
+editors/tile_map/bucket_fill_preview = true
+editors/tile_map/editor_side = 1
+editors/tile_map/palette_min_width = 80
+editors/3d_gizmos/gizmo_colors/room_edge = Color( 0.5, 1, 0, 1 )
+editors/3d_gizmos/gizmo_colors/room_overlap = Color( 1, 0, 0, 1 )
+editors/3d_gizmos/gizmo_colors/instanced = Color( 0.7, 0.7, 0.7, 0.6 )
+editors/3d_gizmos/gizmo_colors/portal_margin = Color( 1, 0.1, 0.1, 0.3 )
+editors/3d_gizmos/gizmo_colors/portal_edge = Color( 0, 0, 0, 0.3 )
+editors/3d_gizmos/gizmo_colors/portal_arrow = Color( 1, 1, 1, 1 )
+editors/3d_gizmos/gizmo_colors/occluder = Color( 1, 0, 1, 1 )
+editors/3d_gizmos/gizmo_colors/path = Color( 0.5, 0.5, 1, 0.8 )
+editors/3d_gizmos/gizmo_colors/csg = Color( 0, 0.4, 1, 0.15 )
+editors/grid_map/editor_side = 1
+editors/grid_map/palette_min_width = 230
+network/language_server/remote_host = "127.0.0.1"
+network/language_server/remote_port = 6008
+network/language_server/enable_smart_resolve = true
+network/language_server/show_native_symbols_in_editor = false
+network/language_server/use_thread = false
+editors/3d_gizmos/gizmo_colors/camera = Color( 0.8, 0.4, 0.8, 1 )
+editors/3d_gizmos/gizmo_colors/stream_player_3d = Color( 0.4, 0.8, 1, 1 )
+editors/3d_gizmos/gizmo_colors/shape = Color( 0.5, 0.7, 1, 1 )
+editors/3d_gizmos/gizmo_colors/skeleton = Color( 1, 0.8, 0.4, 1 )
+editors/3d_gizmos/gizmo_colors/visibility_notifier = Color( 0.8, 0.5, 0.7, 1 )
+editors/3d_gizmos/gizmo_colors/particles = Color( 0.8, 0.7, 0.4, 1 )
+editors/3d_gizmos/gizmo_colors/reflection_probe = Color( 0.6, 1, 0.5, 1 )
+editors/3d_gizmos/gizmo_colors/gi_probe = Color( 0.5, 1, 0.6, 1 )
+editors/3d_gizmos/gizmo_colors/baked_indirect_light = Color( 0.5, 0.6, 1, 1 )
+editors/3d_gizmos/gizmo_colors/navigation_edge = Color( 0.5, 1, 1, 1 )
+editors/3d_gizmos/gizmo_colors/navigation_edge_disabled = Color( 0.7, 0.7, 0.7, 1 )
+editors/3d_gizmos/gizmo_colors/navigation_solid = Color( 0.5, 1, 1, 0.4 )
+editors/3d_gizmos/gizmo_colors/navigation_solid_disabled = Color( 0.7, 0.7, 0.7, 0.4 )
+editors/3d_gizmos/gizmo_colors/joint = Color( 0.5, 0.8, 1, 1 )
+editors/3d_gizmos/gizmo_colors/joint_body_a = Color( 0.6, 0.8, 1, 1 )
+editors/3d_gizmos/gizmo_colors/joint_body_b = Color( 0.6, 0.9, 1, 1 )
+text_editor/help/sort_functions_alphabetically = true
+text_editor/highlighting/gdscript/function_definition_color = Color( 0.4, 0.9, 1, 1 )
+text_editor/highlighting/gdscript/node_path_color = Color( 0.39, 0.76, 0.35, 1 ) \ No newline at end of file
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5bbe921
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+.import/
+logs/
+*.sh
+*.py
+*.pgn
+.vscode/
+exports/
+*.x86_64