From fd0b55fc3afeb9cefa2a2dc136fb801ca02b3013 Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Sun, 3 May 2020 21:12:27 -0400 Subject: [PATCH 1/3] Added `-v` to export call --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 9fb7045..f54aa9a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -19,7 +19,7 @@ fi echo "Building $1 for $2" mkdir -p ~/build/${SubDirectoryLocation:-""} cd ${5-"~"} -godot --${mode} $2 ~/build/${SubDirectoryLocation:-""}$1 +godot -v --${mode} $2 ~/build/${SubDirectoryLocation:-""}$1 cd ~ echo ::set-output name=build::~/build/${SubDirectoryLocation:-""} From 80800f3c97daafa757aff977cb1e351927156acd Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Sun, 3 May 2020 21:16:17 -0400 Subject: [PATCH 2/3] Debugging... :/ Debugging... :/ Debugging... :/ Debugging... :/ Debugging... :/ Debugging... :/ Debugging... :/ Debugging... :/ Debug cleanup --- action.yml | 5 +++-- entrypoint.sh | 21 ++++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/action.yml b/action.yml index 1be4e3f..92c8a2e 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/entrypoint.sh b/entrypoint.sh index f54aa9a..42f1f22 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 -v --${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 From 9615502e3546a7d49e0411971f24aef52649a5fb Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Sun, 3 May 2020 22:03:30 -0400 Subject: [PATCH 3/3] Update ReadMe.md --- ReadMe.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index 693c483..48d9558 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -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* @@ -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