FEATURE: Optionally implement

This commit is contained in:
Joseph Manley 2020-03-16 18:10:19 -04:00
parent baa1c00e61
commit f66e81a876
2 changed files with 12 additions and 1 deletions

View file

@ -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

View file

@ -15,15 +15,22 @@ 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