mirror of
https://github.com/yeslayla/build-godot-action.git
synced 2025-07-18 05:05:07 +02:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
3ba8e158e1 | |||
6d0ae9595d | |||
e8c3cda194 | |||
db6bac2426 | |||
f66e81a876 | |||
baa1c00e61 | |||
f407dbba9d | |||
4cae4d82be | |||
0fb921d27d | |||
9acd6abd7d | |||
0782209122 | |||
84b6b4932b | |||
4286170da9 | |||
64b5e9f54f |
11
.bumpversion.cfg
Normal file
11
.bumpversion.cfg
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[bumpversion]
|
||||||
|
current_version = 0.0.0
|
||||||
|
commit = False
|
||||||
|
tag = True
|
||||||
|
tag_name = {new_version}
|
||||||
|
|
||||||
|
[semver]
|
||||||
|
main_branches = master
|
||||||
|
major_branches =
|
||||||
|
minor_branches = feature
|
||||||
|
patch_branches = hotfix, bugfix
|
17
.github/workflows/test_action.yml
vendored
Normal file
17
.github/workflows/test_action.yml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: Test Action
|
||||||
|
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
TestAction:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Run Action
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
name: test_project
|
||||||
|
preset: linux
|
||||||
|
projectDir: test_project
|
||||||
|
package: 'true'
|
30
.github/workflows/version.yml
vendored
Normal file
30
.github/workflows/version.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
name: Version & Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
CheckVersion:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: rightbrainnetworks/auto-semver
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Run Auto-Semver
|
||||||
|
id: semver
|
||||||
|
uses: RightBrain-Networks/semver-action@1.0.0
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
if: steps['semver']['outputs']['RETURN_STATUS'] == '0'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
|
||||||
|
release_name: ${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
|
||||||
|
body: Release Version ${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
@ -1,3 +1,5 @@
|
|||||||
|
 
|
||||||
|
|
||||||
# Build Godot Project
|
# Build Godot Project
|
||||||
|
|
||||||
This action builds the godot project in your `$GITHUB_WORKSPACE`, so that you can easily automate builds.
|
This action builds the godot project in your `$GITHUB_WORKSPACE`, so that you can easily automate builds.
|
||||||
@ -38,6 +40,12 @@ steps:
|
|||||||
|
|
||||||
Boolean value, when set to true, builds artficat zip file.
|
Boolean value, when set to true, builds artficat zip file.
|
||||||
|
|
||||||
|
#### debugMode
|
||||||
|
|
||||||
|
*Optional*
|
||||||
|
|
||||||
|
Boolean value, when set to true, runs export in debug mode.
|
||||||
|
|
||||||
### Outputs
|
### Outputs
|
||||||
|
|
||||||
#### build
|
#### build
|
||||||
|
@ -14,6 +14,11 @@ inputs:
|
|||||||
package:
|
package:
|
||||||
description: 'Set true to output an artifact zip file'
|
description: 'Set true to output an artifact zip file'
|
||||||
required: false
|
required: false
|
||||||
|
projectDir:
|
||||||
|
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
|
||||||
@ -22,6 +27,8 @@ runs:
|
|||||||
- ${{ inputs.preset }}
|
- ${{ inputs.preset }}
|
||||||
- ${{ inputs.subdirectory }}
|
- ${{ inputs.subdirectory }}
|
||||||
- ${{ inputs.package }}
|
- ${{ inputs.package }}
|
||||||
|
- ${{ inputs.projectDir }}
|
||||||
|
- ${{ inputs.debugMode }}
|
||||||
branding:
|
branding:
|
||||||
icon: loader
|
icon: loader
|
||||||
color: blue
|
color: blue
|
@ -1,33 +1,40 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
workDir=`pwd`
|
|
||||||
|
|
||||||
# Install export templates
|
# Install export templates
|
||||||
wget https://downloads.tuxfamily.org/godotengine/3.1.1/Godot_v3.1.1-stable_export_templates.tpz --quiet
|
wget https://downloads.tuxfamily.org/godotengine/3.2.1/Godot_v3.2.1-stable_export_templates.tpz --quiet
|
||||||
mkdir ~/.cache
|
mkdir ~/.cache
|
||||||
mkdir -p ~/.config/godot
|
mkdir -p ~/.config/godot
|
||||||
mkdir -p ~/.local/share/godot/templates/3.1.1.stable
|
mkdir -p ~/.local/share/godot/templates/3.2.1.stable
|
||||||
unzip Godot_v3.1.1-stable_export_templates.tpz
|
unzip Godot_v3.2.1-stable_export_templates.tpz
|
||||||
mv templates/* ~/.local/share/godot/templates/3.1.1.stable
|
mv templates/* ~/.local/share/godot/templates/3.2.1.stable
|
||||||
rm -f Godot_v3.1.1-stable_export_templates.tpz
|
rm -f Godot_v3.2.1-stable_export_templates.tpz
|
||||||
|
|
||||||
if [ "$3" != "" ]
|
if [ "$3" != "" ]
|
||||||
then
|
then
|
||||||
SubDirectoryLocation="$3/"
|
SubDirectoryLocation="$3/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Export for project
|
mode="export"
|
||||||
echo "Building ${PROJECT} for Linux"
|
if [ "$6" = "true" ]
|
||||||
mkdir -p `pwd`/build/${SubDirectoryLocation:-""}
|
then
|
||||||
godot --export $2 `pwd`/build/${SubDirectoryLocation:-""}$1
|
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 ~
|
||||||
|
|
||||||
|
echo ::set-output name=build::~/build/${SubDirectoryLocation:-""}
|
||||||
|
|
||||||
echo ::set-output name=build::`pwd`/build/${SubDirectoryLocation:-""}
|
|
||||||
|
|
||||||
if [ "$4" = "true" ]
|
if [ "$4" = "true" ]
|
||||||
then
|
then
|
||||||
mkdir `pwd`/package
|
mkdir ~/package
|
||||||
cd `pwd`/build
|
cd ~/build
|
||||||
zip `pwd`/package/artifact.zip ${SubDirectoryLocation:-"*"} -r
|
zip ~/package/artifact.zip ${SubDirectoryLocation:-"."} -r
|
||||||
echo ::set-output name=artifact::`pwd`/package/artifact.zip
|
echo ::set-output name=artifact::~/package/artifact.zip
|
||||||
fi
|
fi
|
@ -0,0 +1,3 @@
|
|||||||
|
source_md5="0167658bc4406f0d0fe437e0197c415a"
|
||||||
|
dest_md5="64b0613b3173e1e1c96dd18b6569e62d"
|
||||||
|
|
7
test_project/default_env.tres
Normal file
7
test_project/default_env.tres
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[gd_resource type="Environment" load_steps=2 format=2]
|
||||||
|
|
||||||
|
[sub_resource type="ProceduralSky" id=1]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
background_mode = 2
|
||||||
|
background_sky = SubResource( 1 )
|
3
test_project/empty_scene.tscn
Normal file
3
test_project/empty_scene.tscn
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[gd_scene format=2]
|
||||||
|
|
||||||
|
[node name="Node2D" type="Node2D"]
|
25
test_project/export_presets.cfg
Normal file
25
test_project/export_presets.cfg
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
[preset.0]
|
||||||
|
|
||||||
|
name="linux"
|
||||||
|
platform="Linux/X11"
|
||||||
|
runnable=true
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter=""
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="../../test_project.x86_64"
|
||||||
|
patch_list=PoolStringArray( )
|
||||||
|
script_export_mode=1
|
||||||
|
script_encryption_key=""
|
||||||
|
|
||||||
|
[preset.0.options]
|
||||||
|
|
||||||
|
texture_format/bptc=false
|
||||||
|
texture_format/s3tc=true
|
||||||
|
texture_format/etc=false
|
||||||
|
texture_format/etc2=false
|
||||||
|
texture_format/no_bptc_fallbacks=true
|
||||||
|
binary_format/64_bits=true
|
||||||
|
binary_format/embed_pck=false
|
||||||
|
custom_template/release=""
|
||||||
|
custom_template/debug=""
|
23
test_project/project.godot
Normal file
23
test_project/project.godot
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
; Engine configuration file.
|
||||||
|
; It's best edited using the editor UI and not directly,
|
||||||
|
; since the parameters that go here are not all obvious.
|
||||||
|
;
|
||||||
|
; Format:
|
||||||
|
; [section] ; section goes between []
|
||||||
|
; param=value ; assign values to parameters
|
||||||
|
|
||||||
|
config_version=4
|
||||||
|
|
||||||
|
_global_script_classes=[ ]
|
||||||
|
_global_script_class_icons={
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[application]
|
||||||
|
|
||||||
|
config/name="test_project"
|
||||||
|
run/main_scene="res://empty_scene.tscn"
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
environment/default_environment="res://default_env.tres"
|
Reference in New Issue
Block a user