mirror of
				https://github.com/yeslayla/build-godot-action.git
				synced 2025-11-04 16:23:04 +01:00 
			
		
		
		
	Merge pull request #7 from josephbmanley/feature/debugMode
Add DebugMode & Update Version
This commit is contained in:
		@ -40,6 +40,12 @@ steps:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Boolean value, when set to true, builds artficat zip file.
 | 
					    Boolean value, when set to true, builds artficat zip file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### debugMode
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    *Optional*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Boolean value, when set to true, runs export in debug mode.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Outputs
 | 
					### Outputs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### build
 | 
					#### build
 | 
				
			||||||
 | 
				
			|||||||
@ -16,6 +16,9 @@ inputs:
 | 
				
			|||||||
    required: false
 | 
					    required: false
 | 
				
			||||||
  projectDir:
 | 
					  projectDir:
 | 
				
			||||||
    description: 'Location of Godot project in repository'
 | 
					    description: 'Location of Godot project in repository'
 | 
				
			||||||
 | 
					  debugMode:
 | 
				
			||||||
 | 
					    description: 'Whether or not to use `--export-debug`'
 | 
				
			||||||
 | 
					    default: false
 | 
				
			||||||
runs:
 | 
					runs:
 | 
				
			||||||
  using: docker
 | 
					  using: docker
 | 
				
			||||||
  image: Dockerfile
 | 
					  image: Dockerfile
 | 
				
			||||||
@ -25,6 +28,7 @@ runs:
 | 
				
			|||||||
    - ${{ inputs.subdirectory }}
 | 
					    - ${{ inputs.subdirectory }}
 | 
				
			||||||
    - ${{ inputs.package }}
 | 
					    - ${{ inputs.package }}
 | 
				
			||||||
    - ${{ inputs.projectDir }}
 | 
					    - ${{ inputs.projectDir }}
 | 
				
			||||||
 | 
					    - ${{ inputs.debugMode }}
 | 
				
			||||||
branding:
 | 
					branding:
 | 
				
			||||||
  icon: loader
 | 
					  icon: loader
 | 
				
			||||||
  color: blue
 | 
					  color: blue
 | 
				
			||||||
@ -2,28 +2,35 @@
 | 
				
			|||||||
set -e
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Install export templates
 | 
					# Install export templates
 | 
				
			||||||
wget https://downloads.tuxfamily.org/godotengine/3.2/Godot_v3.2-stable_export_templates.tpz --quiet
 | 
					wget https://downloads.tuxfamily.org/godotengine/3.2.1/Godot_v3.2.1-stable_export_templates.tpz --quiet
 | 
				
			||||||
mkdir ~/.cache
 | 
					mkdir ~/.cache
 | 
				
			||||||
mkdir -p ~/.config/godot
 | 
					mkdir -p ~/.config/godot
 | 
				
			||||||
mkdir -p ~/.local/share/godot/templates/3.2.stable
 | 
					mkdir -p ~/.local/share/godot/templates/3.2.1.stable
 | 
				
			||||||
unzip Godot_v3.2-stable_export_templates.tpz
 | 
					unzip Godot_v3.2.1-stable_export_templates.tpz
 | 
				
			||||||
mv templates/* ~/.local/share/godot/templates/3.2.stable
 | 
					mv templates/* ~/.local/share/godot/templates/3.2.1.stable
 | 
				
			||||||
rm -f Godot_v3.2-stable_export_templates.tpz
 | 
					rm -f Godot_v3.2.1-stable_export_templates.tpz
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$3" != "" ]
 | 
					if [ "$3" != "" ]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
    SubDirectoryLocation="$3/"
 | 
					    SubDirectoryLocation="$3/"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mode="export"
 | 
				
			||||||
 | 
					if [ "$6" = "true" ]
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
					    mode="export-debug"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Export for project
 | 
					# Export for project
 | 
				
			||||||
echo "Building $1 for $2"
 | 
					echo "Building $1 for $2"
 | 
				
			||||||
mkdir -p ~/build/${SubDirectoryLocation:-""}
 | 
					mkdir -p ~/build/${SubDirectoryLocation:-""}
 | 
				
			||||||
cd ${5-"~"}
 | 
					cd ${5-"~"}
 | 
				
			||||||
godot --export $2 ~/build/${SubDirectoryLocation:-""}$1
 | 
					godot --${mode} $2 ~/build/${SubDirectoryLocation:-""}$1
 | 
				
			||||||
cd ~
 | 
					cd ~
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo ::set-output name=build::~/build/${SubDirectoryLocation:-""}
 | 
					echo ::set-output name=build::~/build/${SubDirectoryLocation:-""}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$4" = "true" ]
 | 
					if [ "$4" = "true" ]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
    mkdir ~/package
 | 
					    mkdir ~/package
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,7 @@ custom_features=""
 | 
				
			|||||||
export_filter="all_resources"
 | 
					export_filter="all_resources"
 | 
				
			||||||
include_filter=""
 | 
					include_filter=""
 | 
				
			||||||
exclude_filter=""
 | 
					exclude_filter=""
 | 
				
			||||||
export_path=""
 | 
					export_path="../../test_project.x86_64"
 | 
				
			||||||
patch_list=PoolStringArray(  )
 | 
					patch_list=PoolStringArray(  )
 | 
				
			||||||
script_export_mode=1
 | 
					script_export_mode=1
 | 
				
			||||||
script_encryption_key=""
 | 
					script_encryption_key=""
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user