mirror of
				https://github.com/yeslayla/build-godot-action.git
				synced 2025-11-04 16:23:04 +01:00 
			
		
		
		
	Merge pull request #13 from josephbmanley/bugfix/debug
Directory-related Bugfixes
This commit is contained in:
		
							
								
								
									
										10
									
								
								ReadMe.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								ReadMe.md
									
									
									
									
									
								
							@ -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.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### projectDir
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    *Optional*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Directory in workspace containing your godot project.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### debugMode
 | 
					#### debugMode
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    *Optional*
 | 
					    *Optional*
 | 
				
			||||||
@ -50,11 +56,11 @@ steps:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#### build
 | 
					#### build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    The location the outputed build is placed.
 | 
					    The location the outputed build is placed relative to GitHub Workspace.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### artifact
 | 
					#### artifact
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    The location the outputed artifact is placed.
 | 
					    The location the outputed artifact is placed relative to GitHub Workspace.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Credits
 | 
					## Credits
 | 
				
			||||||
 | 
				
			|||||||
@ -10,12 +10,13 @@ inputs:
 | 
				
			|||||||
    required: true
 | 
					    required: true
 | 
				
			||||||
  subdirectory:
 | 
					  subdirectory:
 | 
				
			||||||
    description: 'Optional name of the subdirectory to put exported project in'
 | 
					    description: 'Optional name of the subdirectory to put exported project in'
 | 
				
			||||||
    required: false
 | 
					    default: ""
 | 
				
			||||||
  package:
 | 
					  package:
 | 
				
			||||||
    description: 'Set true to output an artifact zip file'
 | 
					    description: 'Set true to output an artifact zip file'
 | 
				
			||||||
    required: false
 | 
					    default: false
 | 
				
			||||||
  projectDir:
 | 
					  projectDir:
 | 
				
			||||||
    description: 'Location of Godot project in repository'
 | 
					    description: 'Location of Godot project in repository'
 | 
				
			||||||
 | 
					    default: ""
 | 
				
			||||||
  debugMode:
 | 
					  debugMode:
 | 
				
			||||||
    description: 'Whether or not to use `--export-debug`'
 | 
					    description: 'Whether or not to use `--export-debug`'
 | 
				
			||||||
    default: false
 | 
					    default: false
 | 
				
			||||||
 | 
				
			|||||||
@ -12,23 +12,26 @@ fi
 | 
				
			|||||||
mode="export"
 | 
					mode="export"
 | 
				
			||||||
if [ "$6" = "true" ]
 | 
					if [ "$6" = "true" ]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
 | 
					    echo "Exporting in debug mode!"
 | 
				
			||||||
    mode="export-debug"
 | 
					    mode="export-debug"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Export for project
 | 
					# Export for project
 | 
				
			||||||
echo "Building $1 for $2"
 | 
					echo "Building $1 for $2"
 | 
				
			||||||
mkdir -p ~/build/${SubDirectoryLocation:-""}
 | 
					mkdir -p $GITHUB_WORKSPACE/build/${SubDirectoryLocation:-""}
 | 
				
			||||||
cd ${5-"~"}
 | 
					cd ${5-"$GITHUB_WORKSPACE"}
 | 
				
			||||||
godot --${mode} $2 ~/build/${SubDirectoryLocation:-""}$1
 | 
					godot --${mode} $2 $GITHUB_WORKSPACE/build/${SubDirectoryLocation:-""}$1
 | 
				
			||||||
cd ~
 | 
					echo "Build Done"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo ::set-output name=build::~/build/${SubDirectoryLocation:-""}
 | 
					echo ::set-output name=build::build/${SubDirectoryLocation:-""}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$4" = "true" ]
 | 
					if [ "$4" = "true" ]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
    mkdir -p ~/package
 | 
					    echo "Packing Build"
 | 
				
			||||||
    cd ~/build
 | 
					    mkdir -p $GITHUB_WORKSPACE/package
 | 
				
			||||||
    zip ~/package/artifact.zip ${SubDirectoryLocation:-"."} -r
 | 
					    cd $GITHUB_WORKSPACE/build
 | 
				
			||||||
    echo ::set-output name=artifact::~/package/artifact.zip
 | 
					    zip $GITHUB_WORKSPACE/package/artifact.zip ${SubDirectoryLocation:-"."} -r
 | 
				
			||||||
 | 
					    echo ::set-output name=artifact::package/artifact.zip
 | 
				
			||||||
 | 
					    echo "Done"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user