17 Commits

Author SHA1 Message Date
e3271898b4 Merge pull request #1 from josephbmanley/refactor/build
Refactor/build
2019-12-28 16:59:19 -05:00
7286d00fbc Update README.md with refactor info 2019-12-28 16:57:55 -05:00
25441faa20 Refactor building to target platform
Refactor artifact output

== -> =
2019-12-28 16:57:53 -05:00
4940f3b222 Add html5 to packaging 2019-12-05 03:32:27 -05:00
7c6b524ff2 BUGFIX: HTML5 Build dir 2019-12-05 03:31:57 -05:00
8958f9cefe BUGFIX: HTML5 Build 2019-12-03 21:57:15 -05:00
00d186c313 BUGFIX: HTML5 Build 2019-12-03 21:27:06 -05:00
bb3ca4865b Fix build directory path 2019-12-03 21:14:51 -05:00
545a327e1b HTML5 Support 2019-12-03 21:03:02 -05:00
36ac8f7987 Build zips to ./package directory
BUGFIX: spacing

. -> *

Subdirectory /

Subdirectory path

Create subdir

Echo platform build

Conditional zip

debug
2019-11-30 21:01:28 -05:00
b6670be025 Merge branch 'master' of github.com:josephbmanley/build-godot-action 2019-11-30 00:05:24 -05:00
e8b4e439a5 BUGFIX - SUBDIR 2019-11-30 00:05:16 -05:00
f41cbbd786 Update ReadMe.md 2019-11-29 23:57:53 -05:00
337ddc6155 Merge branch 'master' of github.com:josephbmanley/build-godot-action 2019-11-29 23:55:57 -05:00
a8c36a5f54 Add subdirectories 2019-11-29 23:55:42 -05:00
4c54598c55 Update ReadMe.md 2019-11-29 23:34:12 -05:00
0ca1161ddb Update ReadMe.md
Fixes the tag used in the example.
2019-11-29 18:40:21 -05:00
4 changed files with 73 additions and 19 deletions

View File

@ -5,7 +5,6 @@ LABEL "com.github.actions.description"="Build a Godot project for multiple platf
LABEL "com.github.actions.icon"="loader"
LABEL "com.github.actions.color"="blue"
LABEL version="1.0.0"
LABEL repository="https://github.com/josephbmanley/build-godot-action"
LABEL homepage="https://cloudsumu.com/"
LABEL maintainer="Joseph Manley <joseph@cloudsumu.com>"

View File

@ -1,27 +1,53 @@
# Build Godot
# Build Godot Project
This action builds the godot project in your `$GITHUB_WORKSPACE`, so that you can easily automate builds.
## Usage
This action will create a `build` folder with subdirectories for linux, windows, and mac. You must have the export preset configured for each platform to successfully export.
This action will create a `build` folder an outputed build. You must have the export preset configured for the target platform to successfully export.
Example:
```yaml
steps:
- uses: josephbmanley/build-godot-action@develop
env:
PROJECT: godot-project
- uses: josephbmanley/build-godot-action@[VERSION]
with:
name: godot-project
preset: HTML5
```
### Environment Variables
### Inputs
- #### PROJECT **REQUIRED**
#### name **required**
Name of the project files to output.
The name of the exported package/binary
#### preset **required**
The name of the preset found in `export_presets.cfg` you would like to build.
#### subdirectory
*Optional*
The subdirectory in the `build` folder to output build to, can be useful for self packaging.
#### package
*Optional*
Boolean value, when set to true, builds artficat zip file.
### Outputs
#### build
The location the outputed build is placed.
#### artifact
The location the outputed artifact is placed.
Eg. `godot-project` will export to `godot-project.exe`
## Credits

View File

@ -1,9 +1,27 @@
name: "Build Godot"
description: "Build a Godot project for multiple platforms"
author: josephbmanley
inputs:
name:
description: 'Name of the exported binary'
required: true
preset:
description: 'Name of the preset in `export_presets.cfg` to use'
required: true
subdirectory:
description: 'Optional name of the subdirectory to put exported project in'
required: false
package:
description: 'Set true to output an artifact zip file'
required: false
runs:
using: docker
image: Dockerfile
args:
- ${{ inputs.name }}
- ${{ inputs.preset }}
- ${{ inputs.subdirectory }}
- ${{ inputs.package }}
branding:
icon: loader
color: blue

View File

@ -1,6 +1,9 @@
#!/bin/sh
set -e
workDir=`pwd`
# Install export templates
wget https://downloads.tuxfamily.org/godotengine/3.1.1/Godot_v3.1.1-stable_export_templates.tpz --quiet
mkdir ~/.cache
mkdir -p ~/.config/godot
@ -9,14 +12,22 @@ 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}
if [ "$3" != "" ]
then
SubDirectoryLocation="$3/"
fi
# Export for Windows
mkdir -p ./build/windows
godot --export "Windows Desktop" ./build/windows/${PROJECT}.exe
# Export for project
echo "Building ${PROJECT} for Linux"
mkdir -p `pwd`/build/${SubDirectoryLocation:-""}
godot --export $2 `pwd`/build/${SubDirectoryLocation:-""}$1
# Export for OSX
mkdir -p ./builds/mac
godot --export "Mac OSX" ./build/mac/${PROJECT}
echo ::set-output name=build::`pwd`/build/${SubDirectoryLocation:-""}
if [ "$4" = "true" ]
then
mkdir `pwd`/package
cd `pwd`/build
zip `pwd`/package/artifact.zip ${SubDirectoryLocation:-"*"} -r
echo ::set-output name=artifact::`pwd`/package/artifact.zip
fi