mirror of
https://github.com/stan220/godot-kotlin-project-template.git
synced 2026-09-08 16:28:57 +00:00
Add Game Export Action
This commit is contained in:
@@ -0,0 +1,63 @@
|
|||||||
|
name: 🪟 Windows Exports Tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-windows-exports:
|
||||||
|
runs-on: windows-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
name: "win-export"
|
||||||
|
steps:
|
||||||
|
- name: Git checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 17
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
with:
|
||||||
|
cache-read-only: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: |
|
||||||
|
./gradlew build -P17
|
||||||
|
|
||||||
|
- name: Create JRE
|
||||||
|
run: |
|
||||||
|
jlink --add-modules java.base,java.logging --output jvm/jre-amd64-windows
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
- name: Download Godot-Kotlin-Jvm binary
|
||||||
|
run: |
|
||||||
|
Invoke-WebRequest -Uri "https://github.com/utopia-rise/godot-kotlin-jvm/releases/download/0.13.1-4.4.1/godot-kotlin-jvm_editor_windows_x86_64_release_0.13.1-4.4.1.zip" -OutFile "godot-kotlin-jvm_editor_windows_x86_64_release_0.13.1-4.4.1.zip"
|
||||||
|
Expand-Archive -Path godot-kotlin-jvm_editor_windows_x86_64_release_0.13.1-4.4.1.zip -DestinationPath .
|
||||||
|
|
||||||
|
- name: Download Godot-Kotlin-Jvm export template
|
||||||
|
run: |
|
||||||
|
Invoke-WebRequest -Uri "https://github.com/utopia-rise/godot-kotlin-jvm/releases/download/0.13.1-4.4.1/godot-kotlin-jvm_export_templates_0.13.1-4.4.1.tpz" -OutFile "godot-kotlin-jvm_export_templates_0.13.1-4.4.1.tpz"
|
||||||
|
mkdir export_templates
|
||||||
|
Expand-Archive -Path godot-kotlin-jvm_export_templates_0.13.1-4.4.1.tpz -DestinationPath ./export_templates
|
||||||
|
|
||||||
|
- name: Run Godot export
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
mkdir export
|
||||||
|
Add-MpPreference -ExclusionPath "${{ github.workspace }}"
|
||||||
|
Add-MpPreference -ExclusionProcess "godot.windows.editor.x86_64.jvm.0.13.1.console.exe"
|
||||||
|
./godot.windows.editor.x86_64.jvm.0.13.1.console.exe --headless --export-release "Windows Desktop" export/game.exe
|
||||||
|
|
||||||
|
- name: Upload to Release
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
Compress-Archive -Path ./export/* -DestinationPath game.zip
|
||||||
|
dir
|
||||||
|
dir ./export
|
||||||
|
gh release create ${{ github.ref_name }} game.zip --notes "Automated release"
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
[preset.0]
|
||||||
|
|
||||||
|
name="Windows Desktop"
|
||||||
|
platform="Windows Desktop"
|
||||||
|
runnable=true
|
||||||
|
advanced_options=true
|
||||||
|
dedicated_server=false
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter=""
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="game.exe"
|
||||||
|
patches=PackedStringArray()
|
||||||
|
encryption_include_filters=""
|
||||||
|
encryption_exclude_filters=""
|
||||||
|
seed=0
|
||||||
|
encrypt_pck=false
|
||||||
|
encrypt_directory=false
|
||||||
|
script_export_mode=2
|
||||||
|
|
||||||
|
[preset.0.options]
|
||||||
|
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release="export_templates/windows_release_x86_64.exe"
|
||||||
|
debug/export_console_wrapper=0
|
||||||
|
binary_format/embed_pck=false
|
||||||
|
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=""
|
||||||
|
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 -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
|
||||||
|
$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}'"
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"custom_jvm_args": [],
|
||||||
|
"debug_address": "*",
|
||||||
|
"debug_port": 5005,
|
||||||
|
"disable_gc": false,
|
||||||
|
"jmx_port": -1,
|
||||||
|
"max_string_size": -1,
|
||||||
|
"use_debug": false,
|
||||||
|
"version": "2.0",
|
||||||
|
"vm_type": "auto",
|
||||||
|
"wait_for_debugger": true
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user