From c3459f2a6a3179e2e4d7402052bcf8b976823190 Mon Sep 17 00:00:00 2001 From: Rasmus Svala Date: Thu, 19 Sep 2024 15:13:09 +0200 Subject: [PATCH 01/11] Create godot_build.yml --- .github/workflows/godot_build.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/godot_build.yml diff --git a/.github/workflows/godot_build.yml b/.github/workflows/godot_build.yml new file mode 100644 index 0000000..68a46de --- /dev/null +++ b/.github/workflows/godot_build.yml @@ -0,0 +1,31 @@ +name: Godot Build + +on: + push: + branches: + - master + +jobs: + build: + name: Build Game + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Godot + uses: albinaask/setup-godot@v1 + with: + godot-version: 4.3 # Specify your Godot version here + + - name: Build + run: | + mkdir -p build/windows + godot --export "Windows Desktop" ./build/windows/game.exe + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: windows-build + path: build/windows/game.exe From a9161a6515881101d8d86ed3dd717313d10799c0 Mon Sep 17 00:00:00 2001 From: rasmussvala Date: Thu, 19 Sep 2024 15:39:35 +0200 Subject: [PATCH 02/11] Correct workflow in actions Hopefully... --- .github/workflows/godot_build.yml | 23 +++++------ export_presets.cfg | 64 +++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 11 deletions(-) create mode 100644 export_presets.cfg diff --git a/.github/workflows/godot_build.yml b/.github/workflows/godot_build.yml index 68a46de..4d9ad55 100644 --- a/.github/workflows/godot_build.yml +++ b/.github/workflows/godot_build.yml @@ -1,31 +1,32 @@ -name: Godot Build +name: Build Godot Project for Windows on: push: branches: - master + pull_request: + branches: + - master jobs: build: - name: Build Game + name: Build Windows Game runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - - name: Setup Godot - uses: albinaask/setup-godot@v1 + - name: Build Godot Project + id: build + uses: manleydev/build-godot-action@v1.4.1 with: - godot-version: 4.3 # Specify your Godot version here - - - name: Build - run: | - mkdir -p build/windows - godot --export "Windows Desktop" ./build/windows/game.exe + name: TDDD23_Game + preset: "Windows Desktop" + debugMode: "false" - name: Upload Artifact uses: actions/upload-artifact@v2 with: name: windows-build - path: build/windows/game.exe + path: ${{ github.workspace }}/${{ steps.build.outputs.build }} \ No newline at end of file diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..7219b45 --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,64 @@ +[preset.0] + +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +advanced_options=false +dedicated_server=false +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_export_mode=2 + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_wrapper=1 +binary_format/embed_pck=true +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +binary_format/architecture="x86_64" +codesign/enable=false +codesign/timestamp=true +codesign/timestamp_server_url="" +codesign/digest_algorithm=1 +codesign/description="" +codesign/custom_options=PackedStringArray() +application/modify_resources=true +application/icon="" +application/console_wrapper_icon="" +application/icon_interpolation=4 +application/file_version="" +application/product_version="" +application/company_name="" +application/product_name="TDDD23 Game" +application/file_description="" +application/copyright="" +application/trademarks="" +application/export_angle=0 +application/export_d3d12=0 +application/d3d12_agility_sdk_multiarch=true +ssh_remote_deploy/enabled=false +ssh_remote_deploy/host="user@host_ip" +ssh_remote_deploy/port="22" +ssh_remote_deploy/extra_args_ssh="" +ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}' +$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}' +$trigger = New-ScheduledTaskTrigger -Once -At 00:00 +$settings = New-ScheduledTaskSettingsSet +$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings +Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true +Start-ScheduledTask -TaskName godot_remote_debug +while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 } +Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue" +ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue +Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue +Remove-Item -Recurse -Force '{temp_dir}'" From 0789ada07fa97479d6c9e16159e2c0a733d89bb9 Mon Sep 17 00:00:00 2001 From: rasmussvala Date: Thu, 19 Sep 2024 15:48:17 +0200 Subject: [PATCH 03/11] Updated version in actions --- .github/workflows/godot_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/godot_build.yml b/.github/workflows/godot_build.yml index 4d9ad55..501d695 100644 --- a/.github/workflows/godot_build.yml +++ b/.github/workflows/godot_build.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build Godot Project id: build @@ -26,7 +26,7 @@ jobs: debugMode: "false" - name: Upload Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: windows-build path: ${{ github.workspace }}/${{ steps.build.outputs.build }} \ No newline at end of file From 561cd6b3e60130187b627fd48d983b9997598095 Mon Sep 17 00:00:00 2001 From: rasmussvala Date: Thu, 19 Sep 2024 15:58:38 +0200 Subject: [PATCH 04/11] Update godot_build.yml --- .github/workflows/godot_build.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/godot_build.yml b/.github/workflows/godot_build.yml index 501d695..254bb69 100644 --- a/.github/workflows/godot_build.yml +++ b/.github/workflows/godot_build.yml @@ -10,23 +10,24 @@ on: jobs: build: - name: Build Windows Game runs-on: ubuntu-latest - + steps: - - name: Checkout + - name: Checkout code uses: actions/checkout@v4 - - - name: Build Godot Project - id: build - uses: manleydev/build-godot-action@v1.4.1 - with: - name: TDDD23_Game - preset: "Windows Desktop" - debugMode: "false" - - - name: Upload Artifact + + - name: Install Godot Engine + run: | + wget https://downloads.tuxfamily.org/godotengine/4.3.0/Godot_v4.3-stable_linux_headless.64.zip + unzip Godot_v4.3-stable_linux_headless.64.zip + sudo mv Godot_v4.3-stable_linux_headless.64 /usr/local/bin/godot + + - name: Build Godot project + run: | + godot --export "Windows Desktop" build/game.exe + + - name: Upload build artifact uses: actions/upload-artifact@v4 with: name: windows-build - path: ${{ github.workspace }}/${{ steps.build.outputs.build }} \ No newline at end of file + path: build/game.exe From 7b55ff09773874a4b79b95c7d5a4bb81445b7398 Mon Sep 17 00:00:00 2001 From: rasmussvala Date: Thu, 19 Sep 2024 16:07:30 +0200 Subject: [PATCH 05/11] Update godot_build.yml again --- .github/workflows/godot_build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/godot_build.yml b/.github/workflows/godot_build.yml index 254bb69..34ca99a 100644 --- a/.github/workflows/godot_build.yml +++ b/.github/workflows/godot_build.yml @@ -18,9 +18,9 @@ jobs: - name: Install Godot Engine run: | - wget https://downloads.tuxfamily.org/godotengine/4.3.0/Godot_v4.3-stable_linux_headless.64.zip - unzip Godot_v4.3-stable_linux_headless.64.zip - sudo mv Godot_v4.3-stable_linux_headless.64 /usr/local/bin/godot + wget https://downloads.tuxfamily.org/godotengine/4.3/Godot_v4.3-stable_linux.x86_64.zip + unzip Godot_v4.3-stable_linux.x86_64.zip + sudo mv Godot_v4.3-stable_linux.x86_64 /usr/local/bin/godot - name: Build Godot project run: | From f4232a72af12c74500aae680871b98cad006373e Mon Sep 17 00:00:00 2001 From: rasmussvala Date: Thu, 19 Sep 2024 16:09:08 +0200 Subject: [PATCH 06/11] Update godot_build.yml With export release --- .github/workflows/godot_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/godot_build.yml b/.github/workflows/godot_build.yml index 34ca99a..e737e3a 100644 --- a/.github/workflows/godot_build.yml +++ b/.github/workflows/godot_build.yml @@ -24,7 +24,7 @@ jobs: - name: Build Godot project run: | - godot --export "Windows Desktop" build/game.exe + godot --export-release "Windows Desktop" build/game.exe - name: Upload build artifact uses: actions/upload-artifact@v4 From bf352f5c4e562e4d79d656993f6cfc02222d8def Mon Sep 17 00:00:00 2001 From: rasmussvala Date: Thu, 19 Sep 2024 16:11:53 +0200 Subject: [PATCH 07/11] Update godot_build.yml And again. --- .github/workflows/godot_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/godot_build.yml b/.github/workflows/godot_build.yml index e737e3a..5a15ebe 100644 --- a/.github/workflows/godot_build.yml +++ b/.github/workflows/godot_build.yml @@ -22,9 +22,9 @@ jobs: unzip Godot_v4.3-stable_linux.x86_64.zip sudo mv Godot_v4.3-stable_linux.x86_64 /usr/local/bin/godot - - name: Build Godot project + - name: Build Godot project (Headless with OpenGL) run: | - godot --export-release "Windows Desktop" build/game.exe + godot --headless --rendering-driver opengl3 --export-release "Windows Desktop" build/game.exe - name: Upload build artifact uses: actions/upload-artifact@v4 From 5fe14978221387b61cf6282537f6e7ad007e5dde Mon Sep 17 00:00:00 2001 From: rasmussvala Date: Thu, 19 Sep 2024 16:16:04 +0200 Subject: [PATCH 08/11] Update godot_build.yml Need Godot Export Template --- .github/workflows/godot_build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/godot_build.yml b/.github/workflows/godot_build.yml index 5a15ebe..eccff12 100644 --- a/.github/workflows/godot_build.yml +++ b/.github/workflows/godot_build.yml @@ -22,6 +22,12 @@ jobs: unzip Godot_v4.3-stable_linux.x86_64.zip sudo mv Godot_v4.3-stable_linux.x86_64 /usr/local/bin/godot + - name: Install Godot Export Templates + run: | + wget https://downloads.tuxfamily.org/godotengine/4.3/Godot_v4.3-stable_export_templates.tpz + mkdir -p ~/.local/share/godot/export_templates/4.3.stable/ + unzip Godot_v4.3-stable_export_templates.tpz -d ~/.local/share/godot/export_templates/4.3.stable/ + - name: Build Godot project (Headless with OpenGL) run: | godot --headless --rendering-driver opengl3 --export-release "Windows Desktop" build/game.exe From ac2d6d79df1e025a51a45be0f3acf188f2f808f4 Mon Sep 17 00:00:00 2001 From: rasmussvala Date: Thu, 19 Sep 2024 16:38:17 +0200 Subject: [PATCH 09/11] Godot Export Action Test --- .github/workflows/godot_build.yml | 56 +++++++++++++++++-------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/.github/workflows/godot_build.yml b/.github/workflows/godot_build.yml index eccff12..25332ba 100644 --- a/.github/workflows/godot_build.yml +++ b/.github/workflows/godot_build.yml @@ -1,6 +1,6 @@ name: Build Godot Project for Windows -on: +on: push: branches: - master @@ -9,31 +9,37 @@ on: - master jobs: - build: + # job id, can be anything + export_game: + # Always use ubuntu-latest for this action runs-on: ubuntu-latest - + # Add permission for release creation. Can be made narrower according to your needs + permissions: write-all + # Job name, can be anything + name: Export Game steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Godot Engine - run: | - wget https://downloads.tuxfamily.org/godotengine/4.3/Godot_v4.3-stable_linux.x86_64.zip - unzip Godot_v4.3-stable_linux.x86_64.zip - sudo mv Godot_v4.3-stable_linux.x86_64 /usr/local/bin/godot - - - name: Install Godot Export Templates - run: | - wget https://downloads.tuxfamily.org/godotengine/4.3/Godot_v4.3-stable_export_templates.tpz - mkdir -p ~/.local/share/godot/export_templates/4.3.stable/ - unzip Godot_v4.3-stable_export_templates.tpz -d ~/.local/share/godot/export_templates/4.3.stable/ - - - name: Build Godot project (Headless with OpenGL) - run: | - godot --headless --rendering-driver opengl3 --export-release "Windows Desktop" build/game.exe + # Always include the checkout step so that + # your project is available for Godot to export + - name: checkout + uses: actions/checkout@v3.3.0 + + - name: export game + id: export + # Use latest version (see releases for all versions) + uses: firebelley/godot-export@v5.2.0 + with: + # Defining all the required inputs + godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/4.0/Godot_v4.0-stable_linux.x86_64.zip + godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/4.0/Godot_v4.0-stable_export_templates.tpz + relative_project_path: ./ + archive_output: true - - name: Upload build artifact - uses: actions/upload-artifact@v4 + # This release action has worked well for me. However, you can most likely use any release action of your choosing. + # https://github.com/ncipollo/release-action + - name: create release + uses: ncipollo/release-action@v1.12.0 with: - name: windows-build - path: build/game.exe + token: ${{ secrets.GITHUB_TOKEN }} + generateReleaseNotes: true + tag: ${{ github.ref_name }} + artifacts: ${{ steps.export.outputs.archive_directory }}/* \ No newline at end of file From 3e43aeee0cd872aa39921f707d6d52a670de391c Mon Sep 17 00:00:00 2001 From: rasmussvala Date: Thu, 19 Sep 2024 16:40:23 +0200 Subject: [PATCH 10/11] Update godot_build.yml --- .github/workflows/godot_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/godot_build.yml b/.github/workflows/godot_build.yml index 25332ba..cfc7721 100644 --- a/.github/workflows/godot_build.yml +++ b/.github/workflows/godot_build.yml @@ -29,8 +29,8 @@ jobs: uses: firebelley/godot-export@v5.2.0 with: # Defining all the required inputs - godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/4.0/Godot_v4.0-stable_linux.x86_64.zip - godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/4.0/Godot_v4.0-stable_export_templates.tpz + godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/4.3/Godot_v4.3-stable_linux.x86_64.zip + godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/4.3/Godot_v4.3-stable_export_templates.tpz relative_project_path: ./ archive_output: true From 1c3d6de8237c12534e77c20ce51036c6d5aa840b Mon Sep 17 00:00:00 2001 From: rasmussvala Date: Fri, 20 Sep 2024 13:33:50 +0200 Subject: [PATCH 11/11] Update export_presets.cfg --- export_presets.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/export_presets.cfg b/export_presets.cfg index 7219b45..108eebc 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -9,7 +9,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="" +export_path="builds/win/win.exe" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -31,7 +31,7 @@ codesign/timestamp_server_url="" codesign/digest_algorithm=1 codesign/description="" codesign/custom_options=PackedStringArray() -application/modify_resources=true +application/modify_resources=false application/icon="" application/console_wrapper_icon="" application/icon_interpolation=4