Skip to content

Commit

Permalink
Merge pull request #13 from josephbmanley/bugfix/debug
Browse files Browse the repository at this point in the history
Directory-related Bugfixes
  • Loading branch information
yeslayla authored May 4, 2020
2 parents 72e3e31 + 9615502 commit 5206884
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
10 changes: 8 additions & 2 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ steps:

Boolean value, when set to true, builds artficat zip file.

#### projectDir

*Optional*

Directory in workspace containing your godot project.

#### debugMode

*Optional*
Expand All @@ -50,11 +56,11 @@ steps:

#### build

The location the outputed build is placed.
The location the outputed build is placed relative to GitHub Workspace.

#### artifact

The location the outputed artifact is placed.
The location the outputed artifact is placed relative to GitHub Workspace.


## Credits
Expand Down
5 changes: 3 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ inputs:
required: true
subdirectory:
description: 'Optional name of the subdirectory to put exported project in'
required: false
default: ""
package:
description: 'Set true to output an artifact zip file'
required: false
default: false
projectDir:
description: 'Location of Godot project in repository'
default: ""
debugMode:
description: 'Whether or not to use `--export-debug`'
default: false
Expand Down
21 changes: 12 additions & 9 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,26 @@ fi
mode="export"
if [ "$6" = "true" ]
then
echo "Exporting in debug mode!"
mode="export-debug"
fi

# Export for project
echo "Building $1 for $2"
mkdir -p ~/build/${SubDirectoryLocation:-""}
cd ${5-"~"}
godot --${mode} $2 ~/build/${SubDirectoryLocation:-""}$1
cd ~
mkdir -p $GITHUB_WORKSPACE/build/${SubDirectoryLocation:-""}
cd ${5-"$GITHUB_WORKSPACE"}
godot --${mode} $2 $GITHUB_WORKSPACE/build/${SubDirectoryLocation:-""}$1
echo "Build Done"

echo ::set-output name=build::~/build/${SubDirectoryLocation:-""}
echo ::set-output name=build::build/${SubDirectoryLocation:-""}


if [ "$4" = "true" ]
then
mkdir -p ~/package
cd ~/build
zip ~/package/artifact.zip ${SubDirectoryLocation:-"."} -r
echo ::set-output name=artifact::~/package/artifact.zip
echo "Packing Build"
mkdir -p $GITHUB_WORKSPACE/package
cd $GITHUB_WORKSPACE/build
zip $GITHUB_WORKSPACE/package/artifact.zip ${SubDirectoryLocation:-"."} -r
echo ::set-output name=artifact::package/artifact.zip
echo "Done"
fi

0 comments on commit 5206884

Please sign in to comment.