From 4f2170064dc78cb5108ea25121768799f786249b Mon Sep 17 00:00:00 2001 From: Joseph Manley Date: Fri, 29 Nov 2019 15:53:20 -0500 Subject: [PATCH] Basic action Opened permissions Move setup to Dockerfile Update Update Update Update Update Update Update Update --- Dockerfile | 16 ++++++++++++++++ action.yml | 9 +++++++++ entrypoint.sh | 22 ++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 Dockerfile create mode 100644 action.yml create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..98f6b83 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM barichello/godot-ci:latest + +LABEL "com.github.actions.name"="Build Godot" +LABEL "com.github.actions.description"="Build a Godot project for multiple platforms" +LABEL "com.github.actions.icon"="loader" +LABEL "com.github.actions.color"="blue" + +LABEL version="0.0.0" +LABEL repository="https://github.com/josephbmanley/build-godot-action" +LABEL homepage="https://cloudsumu.com/" +LABEL maintainer="Joseph Manley " + +USER root +ADD entrypoint.sh /entrypoint.sh +RUN chmod +x entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..8d4fa3e --- /dev/null +++ b/action.yml @@ -0,0 +1,9 @@ +name: "Build Godot" +description: "Build a Godot project for multiple platforms" +author: josephbmanley +runs: + using: docker + image: Dockerfile +branding: + icon: loader + color: blue \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..f1dd900 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +wget https://downloads.tuxfamily.org/godotengine/3.1.1/Godot_v3.1.1-stable_export_templates.tpz --quiet +mkdir ~/.cache +mkdir -p ~/.config/godot +mkdir -p ~/.local/share/godot/templates/3.1.1.stable +unzip Godot_v3.1.1-stable_export_templates.tpz +mv templates/* ~/.local/share/godot/templates/3.1.1.stable +rm -f Godot_v3.1.1-stable_export_templates.tpz + +# Export for Linux +mkdir -p ./build/linux +godot --export Linux/X11 ./build/linux/${PROJECT} + +# Export for Windows +mkdir -p ./build/windows +godot --export "Windows Desktop" ./build/windows/${PROJECT}.exe + +# Export for OSX +mkdir -p ./builds/mac +godot --export "Mac OSX" ./build/mac/${PROJECT} \ No newline at end of file