firebelley / godot-export Goto Github PK
View Code? Open in Web Editor NEWAutomatically exports your Godot games.
License: MIT License
Automatically exports your Godot games.
License: MIT License
This might seem counterproductive, but I'd like to be able to create releases with only the source code and not the executables, since I'm already uploading to itch.io and I don't want to have them in two places. I * could * just write my own release code and set create_release: false
, but since I'm using your plugin...
This is a (hopefully small) feature request.
I am packaging a Godot project, and would like to include extra files, namely README.md
and LICENSE
, in the archive.
Using this action, it's possible to do that in workflow artifacts (by simply running cp
before actions/upload-artifact
). However, it is not easy, or at least not obvious how to do it in releases that this action creates.
In my example use case, I would like to achieve
LinuxX11.zip
|- LICENSE
|- README.md
|- project.pck
|- project.x86
It would be lovely if godot-export
had either an input to specify files to be added to the archive, or a plain shell hook to execute a user-provided script in between exporting and archiving.
When using this firebelley/godot-export, on v2.4.0
- name: export game
uses: firebelley/[email protected]
My pipeline started giving me this error,
It looks like add-path command is being removed. See this blogpost from GitHub:
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
"We are monitoring telemetry for the usage of these commands and plan to fully disable them in the future."
I believe the following line of code would need to be changed,
Line 106 in 5c86ca1
Currently, when uploading release assets, godot-export
archives the contents of the build directory (e.g. the executable and PCK for Linux exports) directly in the zip.
Several of our players have expressed that it would be more convenient if the zip contained a directory, which would then in turn contain the executable and data, as it eliminates the possibility of accidentally mixing the game's files with unrelated ones.
When using use_preset_export_path
, could the action also have a setting to archive the export directory itself, instead of just the contents?
For example:
Game-Linux-X11-amd64
- Game-Linux-X11-amd64.zip
|-- Game.pck
|-- Game.x86_64
- Game-Linux-X11-amd64.zip
|-- Game-Linux-X11-amd64
|-- Game.pck
|-- Game.x86_64
Yo, I'm trying to get this set up in a basic workflow, and it's failing with these errors:
ERROR: copy: Failed to open res://bin/win64/release/libgitapi.dll
At: core/os/dir_access.cpp:298.
ERROR: _fs_changed: Project export failed for preset 'Windows', the export template appears to be missing.
At: editor/editor_node.cpp:753.
reimport: end
ERROR: init_library: does not have a library for the current platform.
At: modules/gdnative/nativescript/nativescript.cpp:1483.
EditorSettings: Save OK!
Mono: Finalizing scripts domain...
Mono: Unloading scripts domain...
Mono: Runtime cleanup...
Mono: Finalized
Error: The process '/home/runner/.local/share/godot/godot_executable/Godot_v3.2.3-stable_mono_linux_headless_64/godot' failed with exit code 1
And here's a link to my workflow yml for reference
Hi,
I am trying to find a way to add assets that should not go into a public repository, but should be used within the build process.
I am thinking of some kind of configuration, where I can put custom commands into a parameter, which are then executed after the repository has been checked out, but before the first export started. commands like downloading an asset pack from a !secret location.
I don't know if this is a valid request - or if there are other best practices on how to solve issues with licensed files in open-source projects. looking forward hearing from you
Godot versions like these don't work with this action:
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.4/beta3/mono/Godot_v3.4-beta3_mono_linux_headless_64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.4/beta3/mono/Godot_v3.4-beta3_mono_linux_headless_64.zip
The problem is that during the template download, the getGodotVersion inside godot.ts will return a string like: 3.4.beta3.mono.official.2b78308f9
The .official will be filtered out but the .2b78308f9 won't. But godot expects a path like 3.4.beta3.mono by default, that's why it's crashing.
Why doesnt it automatically generate the keystore and stuff?
Currently projects that use automatic blender import get this error during the import stage:
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
at: _editor_init (modules/gltf/register_types.cpp:61)
Which then means that the import stage doesn't work so there's no .godot folder when building
My action builds the linux and windows files just fine, but the MacOS zip file produced is always empty. I am getting the following error during the export game
step:
/home/runner/.local/share/godot/godot_executable/godot /home/runner/work/stream-captions/stream-captions/project.godot --headless --export-release mac /home/runner/.local/share/godot/builds/mac/stream-captions.zip
Godot Engine v4.0.stable.official.92bee43ad - https://godotengine.org/
WARNING: Custom cursor shape not supported by this display server.
at: cursor_set_custom_image (servers/display_server.cpp:480)
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
at: _editor_init (modules/gltf/register_types.cpp:70)
ERROR: Cannot export project with preset "mac" due to configuration errors:
Warning: Notarization is disabled. The exported project will be blocked by Gatekeeper if it's downloaded from an unknown source.
Code signing: Xcode command line tools are not installed.
at: _fs_changed (editor/editor_node.cpp:967)
ERROR: Project export for preset "mac" failed.
at: _fs_changed (editor/editor_node.cpp:983)
Full log at https://github.com/sinnom/stream-captions/actions/runs/4380350505/jobs/7667316410
Below is my github action workflow yaml:
# Whenever a tag push matching pattern "v*" then run the job
on:
push:
tags:
- "v*"
jobs:
# job id, can be anything
export_game:
# Always use ubuntu-latest for this action
runs-on: ubuntu-latest
# Add permission for release creation. Can be made narrower according to your needs
permissions:
contents: write
# Job name, can be anything
name: Export Game
steps:
# Always include the checkout step so that
# your project is available for Godot to export
- name: checkout
uses: actions/[email protected]
- name: export game
id: export
# Use latest version (see releases for all versions)
uses: firebelley/[email protected]
with:
# Defining all the required inputs
godot_executable_download_url: https://github.com/godotengine/godot/releases/download/4.0-stable/Godot_v4.0-stable_linux.x86_64.zip
godot_export_templates_download_url: https://github.com/godotengine/godot/releases/download/4.0-stable/Godot_v4.0-stable_export_templates.tpz
relative_project_path: ./
archive_output: true
use_godot_4: true
# This release action has worked well for me. However, you can most likely use any release action of your choosing.
# https://github.com/ncipollo/release-action
- name: create release
uses: ncipollo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
draft: true
tag: ${{ github.ref_name }}
artifacts: ${{ steps.export.outputs.archive_directory }}/*
I don't think the cursor shape or blend file import warnings are relevant to the failed build, as I get those for the linux and windows builds which succeed both on my macbook and in the github action.
I don't think the notarization and code signing warnings are relevant to the failed build, as I get those when I build locally on my macbook too.
My MacOS export profile is the default one with the following changes:
mac
builds/stream-captions.zip
com.sinnom.stream-captions
My repo has 4 godot projects, should look like this "/root/game/godot.project" I cant get the workflow to find it though...
Hey,
When I try to add the env secret I get this error:
"Failed to add secret. Secret names must not start with GITHUB_. "
The env variable is GITHUB_TOKEN
There is some info about this when triggering from a forked repo (which I am):
https://docs.github.com/en/actions/reference/encrypted-secrets#using-encrypted-secrets-in-a-workflow
See
Line 165 in 1e28506
This is really spamming the logs with not so interesting stuff. But it might help with debugging in some cases. That's why i propose to make it optional
Thanks for this action!
I'm trying to export without creating a release. If I set create_release: false
and leave out the token, I get:
2020-04-15T21:18:20.7351972Z with:
2020-04-15T21:18:20.7352134Z godot_executable_download_url: https://archive.hugo.pro/godot-tuxfamily/3.2.1/Godot_v3.2.1-stable_linux_headless.64.zip
2020-04-15T21:18:20.7352420Z godot_export_templates_download_url: https://archive.hugo.pro/godot-tuxfamily/3.2.1/Godot_v3.2.1-stable_export_templates.tpz
2020-04-15T21:18:20.7352561Z godot_template_version: 3.2.1.stable
2020-04-15T21:18:20.7352668Z relative_project_path: ./
2020-04-15T21:18:20.7352772Z create_release: false
2020-04-15T21:18:20.7352858Z base_version: 0.0.1
2020-04-15T21:18:20.7352960Z ##[endgroup]
2020-04-15T21:18:20.8165992Z /home/runner/work/_actions/firebelley/godot-export/v1.2.0/dist/index.js:7854
2020-04-15T21:18:20.8166707Z throw new Error('Parameter token or opts.auth is required');
2020-04-15T21:18:20.8167130Z ^
2020-04-15T21:18:20.8167205Z
2020-04-15T21:18:20.8167410Z Error: Parameter token or opts.auth is required
2020-04-15T21:18:20.8168066Z at Function.getAuthString (/home/runner/work/_actions/firebelley/godot-export/v1.2.0/dist/index.js:7854:19)
2020-04-15T21:18:20.8168403Z at Function.getOctokitOptions (/home/runner/work/_actions/firebelley/godot-export/v1.2.0/dist/index.js:7819:29)
2020-04-15T21:18:20.8168699Z at new GitHub (/home/runner/work/_actions/firebelley/godot-export/v1.2.0/dist/index.js:7803:22)
2020-04-15T21:18:20.8169082Z at Module.560 (/home/runner/work/_actions/firebelley/godot-export/v1.2.0/dist/index.js:10579:22)
2020-04-15T21:18:20.8169341Z at __webpack_require__ (/home/runner/work/_actions/firebelley/godot-export/v1.2.0/dist/index.js:22:30)
2020-04-15T21:18:20.8169574Z at startup (/home/runner/work/_actions/firebelley/godot-export/v1.2.0/dist/index.js:37:19)
2020-04-15T21:18:20.8169816Z at /home/runner/work/_actions/firebelley/godot-export/v1.2.0/dist/index.js:43:18
2020-04-15T21:18:20.8170072Z at Object.<anonymous> (/home/runner/work/_actions/firebelley/godot-export/v1.2.0/dist/index.js:46:10)
2020-04-15T21:18:20.8170168Z at Module._compile (internal/modules/cjs/loader.js:959:30)
2020-04-15T21:18:20.8170262Z at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
Thanks, please let me know if you need any additional details.
I want to just create an artifact for the workflow instead of a release, I can do that manually, I don't want it to release on every commit I do
I'm having an issue where, when building for Linux 64-bit, it just crashes. I have 1 addon, Zylann's Terrain addon. Here is the run if you want to see if it's on my side:
https://github.com/Awesome-Arcade/Mazerator/runs/1271633001?check_suite_focus=true
You can also use this to check my code or Workflow file. For now, I'll try and stop linux from building
Is there a way to use this to deploy the code to a gh-pages branch for use in github.io site?
I'm trying to combine what you have with this:
https://github.com/JamesIves/github-pages-deploy-action
But I don't know how to get the exported source for that action.
I tried setting:
create_release: false
but it didn't create an exports folder anywhere on my project to get the exported game.
I wanted to try out this action, but got the following error:
export game
Run firebelley/[email protected]
with:
base_version: 0.0.1
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_linux_headless.64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_export_templates.tpz
relative_project_path: ./
godot_template_version: 3.1.2.stable
env:
GITHUB_TOKEN: ***
Using release version v0.0.1
Working path created /home/runner/.local/share/godot
Godot setup
Downloading Godot executable from https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_linux_headless.64.zip
Downloading Godot export templates from https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_export_templates.tpz
/usr/bin/wget -nv https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_linux_headless.64.zip -O /home/runner/.local/share/godot/godot.zip
/usr/bin/wget -nv https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_export_templates.tpz -O /home/runner/.local/share/godot/godot_templates.tpz
2020-01-16 22:52:32 URL:https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_linux_headless.64.zip [25055920/25055920] -> "/home/runner/.local/share/godot/godot.zip" [1]
/usr/bin/unzip -q /home/runner/.local/share/godot/godot.zip -d /home/runner/.local/share/godot/godot_executable
Found executable in /home/runner/.local/share/godot/godot_executable/Godot_v3.1.2-stable_linux_headless.64
##[error]ENOTDIR: not a directory, scandir '/home/runner/.local/share/godot/godot_executable/Godot_v3.1.2-stable_linux_headless.64'
##[error]ENOTDIR: not a directory, scandir '/home/runner/.local/share/godot/godot_executable/Godot_v3.1.2-stable_linux_headless.64'
##[error]Node run failed with exit code 1
can you tell me which directory it does not find?
my workflow yml:
name: CI
# Whenever a push is made to the master branch then run the job
on:
push:
branches:
- master
jobs:
# job id, can be anything
export_game:
# Always use ubuntu-latest for this action
runs-on: ubuntu-latest
# Job name, can be anything
name: Export Game Job
steps:
# Always include the checkout step so that
# your project is available for Godot to export
- name: checkout
uses: actions/checkout@v1
- name: export game
# Use version 1.0.0 (see releases for all versions)
uses: firebelley/[email protected]
with:
# Base version. Patch versions are incremented when this action runs.
base_version: 0.0.1
# The download url of the 64 bit Linux Headless Godot executable
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_linux_headless.64.zip
# The url of the export templates corresponding to the Godot executable version
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.1.2/Godot_v3.1.2-stable_export_templates.tpz
# The relative path containing the "project.godot" file
relative_project_path: ./
# The name of the folder which templates are stored in. Looks like '3.1.1.stable.mono'. Can be found at %APPDATA\Roaming\Godot\templates on Windows and ~/.local/share/godot/templates on Linux.
godot_template_version: 3.1.2.stable
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
my export_presets.cfg:
[preset.0]
name="Family Tree win"
platform="Windows Desktop"
runnable=false
custom_features=""
export_filter="all_resources"
include_filter="settings.cfg"
exclude_filter="_familytree/*,_familytree/Stammbaum*Media/*"
export_path="dist/godot-familytree.exe"
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=true
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=true
custom_template/release=""
custom_template/debug=""
application/icon=""
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name="Godot Family Tree"
application/file_description="Godot Family Tree"
application/copyright=""
application/trademarks=""
[preset.1]
name="Family Tree web"
platform="HTML5"
runnable=false
custom_features=""
export_filter="all_resources"
include_filter="settings.cfg"
exclude_filter="_familytree/*,_familytree/Stammbaum*Media/*"
export_path="dist/godot-familytree.html"
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.1.options]
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=true
html/custom_html_shell=""
html/head_include=""
custom_template/release=""
custom_template/debug=""
[preset.2]
name="Family Tree linux"
platform="Linux/X11"
runnable=false
custom_features=""
export_filter="all_resources"
include_filter="settings.cfg"
exclude_filter="_familytree/*,_familytree/Stammbaum*Media/*"
export_path="dist/godot-familytree"
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.2.options]
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=true
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=true
custom_template/release=""
custom_template/debug=""
Link to repository in case you want to check something else:
https://github.com/h4de5/godot-familytree
Here's the relevant part of my yaml:
on:
push:
branches:
- master
jobs:
export:
name: export executables
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/[email protected]
with:
fetch-depth: 0
- name: create executables
uses: firebelley/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GODOT_MONO_VERSION: 3.2.2
with:
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/${{env.GODOT_MONO_VERSION}}/mono/Godot_v${{env.GODOT_MONO_VERSION}}-stable_mono_linux_headless_64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/${{env.GODOT_MONO_VERSION}}/mono/Godot_v${{env.GODOT_MONO_VERSION}}-stable_mono_export_templates.tpz
relative_project_path: ./
use_preset_export_path: true
archive_export_output: true
create_release: true
base_version: 0.0.1
Here's the relevant part of the log:
env:
GITHUB_TOKEN: ***
GODOT_MONO_VERSION: 3.2.2
Download Godot
Working path created /home/runner/.local/share/godot
Downloading Godot export templates from https://downloads.tuxfamily.org/godotengine/3.2.2/mono/Godot_v3.2.2-stable_mono_export_templates.tpz
Downloading Godot executable from https://downloads.tuxfamily.org/godotengine/3.2.2/mono/Godot_v3.2.2-stable_mono_linux_headless_64.zip
/usr/bin/wget -nv https://downloads.tuxfamily.org/godotengine/3.2.2/mono/Godot_v3.2.2-stable_mono_export_templates.tpz -O /home/runner/.local/share/godot/godot_templates.tpz
/usr/bin/wget -nv https://downloads.tuxfamily.org/godotengine/3.2.2/mono/Godot_v3.2.2-stable_mono_linux_headless_64.zip -O /home/runner/.local/share/godot/godot.zip
2020-12-02 06:25:34 URL:https://downloads.tuxfamily.org/godotengine/3.2.2/mono/Godot_v3.2.2-stable_mono_export_templates.tpz [623608361/623608361] -> "/home/runner/.local/share/godot/godot_templates.tpz" [1]
Error: Unable to locate executable file: godot. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
The environment-variable-injected URL's are correct because I can download the files directly from them in the log.
Hi!
First time submitting an issue here, so please forgive me if I'm missing something.
I'm trying to build for Android using Godot 4 and I noticed that using use_godot_4
doesn't quite do the trick in this case, as the configuration file should have the sdk location, which is in the editor_settings-3.tres
, yet when using Godot 4 it's using editor_settings-4.tres
. I believe it could be an easy fix in the ๐ Adding Editor Settings
step, but my knowledge only goes so far.
Here's my main.yml in case it helps:
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Export Game
uses: firebelley/[email protected]
with:
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/4.0/beta1/Godot_v4.0-beta1_linux.x86_64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/4.0/beta1/Godot_v4.0-beta1_export_templates.tpz
relative_project_path: ./
use_preset_export_path: true
use_godot_4: true
I'm using a custom build of Godot, and the export templates .tpz
is stored inside of a zip file, so I cannot just pass it into godot_export_templates_download_url
argument. It would be nice if we could manually pass in the file path to the export templates and the godot executable, in case we have to do some processing before hand.
I'd image it could look something like this:
- name: Export Game
id: export
uses: firebelly/[email protected]
with:
godot_executable_path: $HOME/downloads/godot.x11.opt.tools
godot_export_templates_download_path: $HOME/downloads/export_templates.tpz
Will be more easier to export and test games that uses plugins:
https://docs.godotengine.org/en/stable/getting_started/workflow/export/android_custom_build.html
In Godot, if you export from a folder it is relative to res:// root.
The same should happen when you use this action.
With these settings, outputs go in /build/ (as specified in my exports file) where they should go in /game/build
- name: export game
# Use latest version (see releases for all versions)
uses: firebelley/godot-export@55461c5b671a5aea2ffdc01f0f3c131b5f87cabe
with:
# Use 3.3.2. Need Linux headless for building.
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.3.3/Godot_v3.3.3-stable_linux_headless.64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.3.3/Godot_v3.3.3-stable_export_templates.tpz
relative_project_path: ./game/
use_preset_export_path: true
# relative_export_path: ./game/build/win/
archive_export_output: false
create_release: false
# base_version: ${{ steps.tag_version.outputs.TAG_VERSION}}
export_debug: true
Since GitHub Actions has updated ubuntu-latest
to 20.04
, Godot Mono from 3.2.3
onward, requires .NET Core 3.1 SDK
or .NET 5 SDK
(both the latest as of this writing) to be installed. Just to clarify, previously, Ubuntu 18.04
+ Godot Mono 3.2.3-stable
+ [email protected]
worked just fine without installing a .NET SDK).
Otherwise, you will get errors like the following:
>Export binaries
...
Mono: Failed to load Core API assembly
Mono: Failed to load project assembly
...
ERROR: godot_icall_GD_pusherror: Failed to export project: Failed to build project
At: modules/mono/glue/gd_glue.cpp:250.
...
System.Exception: Failed to build project
at GodotTools.Export.ExportPlugin._ExportBeginImpl (System.String[] features, System.Boolean isDebug, System.String path, System.Int32 flags) [0x0007e] in <c8b5a5308c6141d8acc11a71c13bb4ae>:0
at GodotTools.Export.ExportPlugin._ExportBegin (System.String[] features, System.Boolean isDebug, System.String path, System.Int32 flags) [0x0000b] in <c8b5a5308c6141d8acc11a71c13bb4ae>:0
Something like https://github.com/actions/setup-dotnet can be suggested to solve this. (It would have saved me many hours of frustration. See comments for more information):
- name: install .net sdk
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
Update: It's also required to use a specific custom editor setting (see comments for more information):
[resource]
mono/builds/build_tool = 3
to allow Godot to run dotnet msbuild
during export instead of just msbuild
.
Please see this issue comment with following solution and this Godot documentation section for more information about this problem.
I was following your example for exporting builds, created the export in Godot etc ... but whenever I ran the runner, it only added the ZIPPED project to the release (source code) and not the created win.exe (although the output showed it was created)
I needed to add
use_preset_export_path: true
to the export step and added an additional archive at the end
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: builds
path: |
builds
to get it to work. Now the exe is at least archived. But not added to release.
Then I realized (whiloe looking at the logs) that the variable that is used to point to the release output is not resolving to anything meaningful. You might want to check this
I changed it to the builds folder that you also used in the example and referenced the runner work dir, and then it works
- name: create release
uses: softprops/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true
tag_name: ${{ steps.tag_version.outputs.TAG_VERSION }}
files: ${{ github.workspace }}/builds/win/win.zip
Ref: https://github.com/firegate666/godot_tutorial_2d_dodge_the_creeps/actions
Would there be any way to use this on azure pipeline?
Hi,
Currently as I can see godot do not support any way to store android keystore passwords anywhere outside of export_presets.cfg file which is not really secure for release versions in public repsitories.
Can you please add this functionality to your plugin please?
It can be done in a following way:
Currently, the export directory is created within relative_project_path
but it would be nice to be able to put it somewhere else, including the repo's root directory (if different from the godot project's root) and/or a different name for the export directory.
For example someone might want to use github pages' ability to auto-read the /docs
directory of a repository
I am attempting to run this Action with Godot 4 beta 16 and get a (likely) infinite hang on the Import Project step, where it will read out some errors and warnings, then just stop until I manually cancel the pipeline. My workflow file is as follows:
name: Build Godot Project
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
export_game:
runs-on: ubuntu-latest
name: Export Ultracop
steps:
- name: checkout
uses: actions/[email protected]
# Automatically stores the tag name for later use
- name: get tag from version
id: tag_version
run: |
echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: export
id: export
# Use latest version (see releases for all versions)
uses: firebelley/godot-export@master
with:
# Defining all the required inputs
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/4.0/beta16/mono/Godot_v4.0-beta16_mono_linux_x86_64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/4.0/beta16/mono/Godot_v4.0-beta16_mono_export_templates.tpz
relative_project_path: ./game
relative_export_path: ./dist
archive_output: true
export_debug: true
verbose: true
use_godot_4: true
# This release action has worked well for me. However, you can most likely use any release action of your choosing.
# https://github.com/ncipollo/release-action
- name: create release
uses: ncipollo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
tag: v${{ steps.tag_version.outputs.TAG_VERSION }} # Note that the 'v' in front was necessary to get this action attach artifacts to the tag
artifacts: ${{ steps.export.outputs.archive_directory }}/*
Import Project step output is as follows (first steps look normal):
/home/runner/.local/share/godot/godot_executable/Godot_v4.0-beta16_mono_linux_x86_64/godot /home/runner/work/Ultracop/Ultracop/game/project.godot --headless -e --quit
Godot Engine v4.0.beta16.mono.official.518b9e580 - https://godotengine.org/
WARNING: Custom cursor shape not supported by this display server.
at: cursor_set_custom_image (servers/display_server.cpp:480)
WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
at: _editor_init (modules/gltf/register_types.cpp:61)
ERROR: Cannot open file 'res://.godot/imported/tire_generic_01.obj-a77d41c0f184c06e1039a587a0711187.mesh'.
at: get_dependencies (core/io/resource_format_binary.cpp:1237)
ERROR: Cannot open file 'res://.godot/imported/car_01_body.obj-0d40941976fca911da8b02a73c9e46d8.mesh'.
at: get_dependencies (core/io/resource_format_binary.cpp:1237)
ERROR: Cannot open file 'res://.godot/imported/car_02.gltf-8d951f950f3482a2d3ab8a472ed93667.scn'.
at: get_dependencies (core/io/resource_format_binary.cpp:1237)
ERROR: Cannot open file 'res://.godot/imported/car_02.obj-a715d119ee8143cd02bafb081cffdaee.mesh'.
at: get_dependencies (core/io/resource_format_binary.cpp:1237)
ERROR: Cannot open file 'res://.godot/imported/character_test.gltf-7b77f7ef203aa57aa19af8a6581c0a0a.scn'.
at: get_dependencies (core/io/resource_format_binary.cpp:1237)
WARNING: OBJ: Ambient light for material 'Black' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'Grey' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'Black' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'Blue' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'Grey' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'Headlights' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'TailLights' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'Windows' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'Black' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'Grey' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'Headlights' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'TailLights' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'White' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: OBJ: Ambient light for material 'Windows' is ignored in PBR
at: _parse_material_library (editor/import/resource_importer_obj.cpp:65)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D2' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D3' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D4' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D5' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D6' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D7' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D8' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D9' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D10' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D11' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D12' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
WARNING: Node 'Node2/Skeleton3D/BoneAttachment3D13' was modified from inside an instance, but it has vanished.
at: instantiate (scene/resources/packed_scene.cpp:178)
Error: The operation was canceled.
My initial thought was that it could be the ERROR
s causing the issue, however even if I commit those files to the repository, I just get new errors that don't exist at runtime and don't exist when exporting locally for Windows or Linux, that error in the Action being something like:
ERROR: Attempt to disconnect a nonexistent connection from 'Skeleton3D:<Skeleton3D#1697485221789>'. Signal: 'bone_pose_changed', callable: 'BoneAttachment3D::on_bone_pose_update'.
at: _disconnect (core/object/object.cpp:1327)
```
I just ran into this issue: godotengine/godot#48076
As I understand it, exporting to MacOS requires the export to be done by MacOS. When looking up how to do github actions, I found this project, which looks great but would be very handy for it to support MacOS builds gracefully to make this problem much easier to deal with for opensource projects who don't have a MacOS machine.
I referenced this example in make my test workflow:
https://github.com/robpc/maze-test-game/blob/osx-test/.github/workflows/release-macos.yml
Mine (untested):
https://github.com/RKelln/godot-boids-acceleration-structure/blob/jackson/.github/workflows/release-macos.yml
notes:
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.2.2/mono/Godot_v3.2.2stable_mono_export_templates.tpz
which is an invalid url. should be:
https://downloads.tuxfamily.org/godotengine/3.2.2/mono/Godot_v3.2.2-stable_mono_export_templates.tpz
missing dash between v3.2.2 and stable
It would be useful to be able to specify via a boolean flag to not include the zipped executables in the GitHub release, when create_release
is true. Furthermore, the archive_*
settings are a bit confusing because they don't actually have anything to do with this feature request, but they appear to.
The use case for this feature is not wanting my Godot game downloadable from GitHub, as it's being published through Itch.io, and I would like all downloads to go through said channel only. I attempted a workaround of using a GitHub Action that claimed it would delete the assets from a GitHub release, but I tried everything and it would find the version tag correctly, but couldn't find any uploaded assets associated with it. Although I specified the job to run after your release process, I think it may be a race condition where the assets are still being uploaded when the deletion job runs. I haven't found a way to trigger a deletion job upon completion of release asset uploads, at least not through godot-export
.
My current workaround is to manually go in and delete the assets via GitHub's web API, which is of course not ideal as I'm building an automated CI/CD pipeline.
The other consideration for implementation of this feature is being able to specify wildcard patterns to match which assets to upload. I would like to keep the zipped source code assets attached to the GitHub release, and be able to specify, e.g., don't upload mygame-*.zip
, where *
would represent for example, mac
/ win
/ linux
, in this case.
Hi!
Thank you for the amazing github action. This is super helpful, I love it.
I had a hard time in getting the Android export to work, though. The steps I went through:
setup-android
, but it wasn't really. Here's the diff: [gd_resource type="EditorSettings" format=2]
[resource]
+ export/android/android_sdk_path = "/usr/local/lib/android/sdk"
- export/android/adb = "/usr/bin/adb"
- export/android/jarsigner = "/usr/bin/jarsigner"
- export/android/custom_build_sdk_path = "/usr/local/lib/android/sdk"
mono/builds/build_tool = 0
First, no adb
nor jarsigner
are installed in /usr/bin
. Then, the custom_build_sdk_path
didn't work for me. Maybe it's linked to the fact that I do not use a custom build template (in that case, it's super weird of Godot to differenciate a SDK for a custom build or default build, but well).
Two questions:
If you agree with those, I could handle it if you want.
Thanks ๐ค
I get the following warning using the verbose flag
Unexpected input(s) 'verbose', valid inputs are ['godot_executable_download_url', 'godot_export_templates_download_url', 'relative_project_path', 'archive_output', 'archive_root_folder', 'relative_export_path', 'use_preset_export_path', 'wine_path', 'export_debug']
What platforms are possible? Is it just Windows, Mac and Linux?
From the README:
Using custom editor settings
Some Godot configurations are editor-based and not project-based.
This includes things like Android paths. This repository provides a base
editor settings that will be used by default when exporting your games.
However, you can supply a custom editor settings configuration by simply
copying a a custom editor settings file to ~/.config/godot/editor_settings-3.tres
before this action runs. This action will not overwrite an existing editor_settings-3.tres file.
However, I have not found this to be the case. Following the instructions, I create a custom editor settings file as ~/.config/godot/editor_settings-3.tres
and I cat
the contents before and after godot-export
. Before, it has my custom contents. After, it has your contents. I've even tried making the file read-only but it STILL gets overwritten, and in that case an error occurs:
WARNING: create: Could not open config file.
At: editor/editor_settings.cpp:989.
The default editor settings are unwanted and break the export process, yet there is no way to stop it from happening that I have been able to find.
Relevant yml
excerpt:
...
steps:
...
- name: use custom editor settings
run: |
mkdir -p ~/.config/godot
cp default_env.tres ~/.config/godot/editor_settings-3.tres
cat ~/.config/godot/editor_settings-3.tres
- name: create executables
uses: firebelley/[email protected]
...
- name: show custom editor settings
run: cat ~/.config/godot/editor_settings-3.tres
...
Seems like the force: false
flag from #42 might not be effective.
I'm using your example and the action always ends in an error when compiling the windows binaries. The log output is the following:
ERROR: _fs_changed: Cannot export project with preset 'win' due to configuration errors:
No export template found at the expected path:
/home/runner/.local/share/godot/templates/3.2.stable/windows_64_debug.exe
No export template found at the expected path:
/home/runner/.local/share/godot/templates/3.2.stable/windows_64_release.exe
At: editor/editor_node.cpp:611.
ERROR: _fs_changed: Project export failed for preset 'win', the export template appears to be missing.
At: editor/editor_node.cpp:634.
reimport: end
ERROR: ~List: Condition "_first != __null" is true.
At: ./core/self_list.h:112.
ERROR: cleanup: There are still MemoryPool allocs in use at exit!
At: core/pool_vector.cpp:69.
##[error]The process '/home/runner/.local/share/godot/godot_executable/godot' failed with exit code 1
##[error]The process '/home/runner/.local/share/godot/godot_executable/godot' failed with exit code 1
My export_preset looks like this:
[preset.0]
name="win"
platform="Windows Desktop"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="KneckTD.exe"
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=""
codesign/enable=false
codesign/identity_type=0
codesign/identity=""
codesign/password=""
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PoolStringArray( )
application/icon=""
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
And finally the Action file:
on:
push:
branches:
- master
jobs:
# job id, can be anything
export_game:
# Always use ubuntu-latest for this action
runs-on: ubuntu-latest
# Job name, can be anything
name: Export Game Job
steps:
# Always include the checkout step so that
# your project is available for Godot to export
- name: checkout
uses: actions/[email protected]
- name: export game
# Use version 1.1.0 (see releases for all versions)
uses: firebelley/[email protected]
with:
# Defining all the required inputs
# I used the mono version of Godot in this example
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.2/Godot_v3.2-stable_linux_headless.64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.2/mono/Godot_v3.2-stable_mono_export_templates.tpz
godot_template_version: 3.2.stable.mono
relative_project_path: ./
create_release: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Any idea why this is happening?
Is it currently possible to run this on tag creation and have it upload to that tag instead of creating a tag of its own?
My project exports a single .exe as I am currently using the "Embed Pck" export option. Ideally, I would like to avoid having to unzip every release. This is a very minor/low priority request.
ERROR: _fs_changed: Cannot export project with preset 'Android' due to configuration errors:
ADB executable not configured in the Editor Settings.
Debug keystore not configured in the Editor Settings nor in the preset.
At: editor/editor_node.cpp:730.
ERROR: _fs_changed: Project export failed with error code 3 for preset 'Android'.
At: editor/editor_node.cpp:753.
EditorSettings: Save OK!
Error: The process '/home/runner/.local/share/godot/godot_executable/godot' failed with exit code 1
workflow: https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/runs/1392365046?check_suite_focus=true
Why adb path is hardcoded in the editor_settings-3.tres if adb is not provided?
I tried to use this action https://github.com/android-actions/setup-android that setup android sdk for me.
And I had to fork this repository to change its path
https://github.com/ricardoalcantara/godot-export/blob/master/dist/editor_settings-3.tres
I noticed that here
https://github.com/firebelley/godot-export/blob/master/src/godot.ts#L258
you write two properites in that editor_settings,
Couldn't any editor_settings be input in this action?
Thanks!
We have a game were we want to automatically deploy it with github pages, but we're encountering an issue regarding export path.
rsync: change_dir "/home/runner/work/crackout/crackout//HTML5/" failed: No such file or directory (2)
is the error we get, because this is the export path we set in export_presets.cfg.
But this is not the path were our game is exported. If we go up we can see it's exported here
/home/runner/.local/share/godot/godot_executable/Godot_v3.2.2-stable_mono_linux_headless_64/godot /home/runner/work/crackout/crackout/project.godot --export HTML5 /home/runner/.local/share/godot/builds/HTML5/index.html --verbose
More specifically here: /home/runner/.local/share/godot/builds/HTML5/index.html
While we expect it to be exported to our chosen path here:
/home/runner/work/crackout/crackout/HTML5/
(Rather have it at home/runner/crackout/HTML5
but that's another issue)
Here is our deployment.yml
name: Deployment
on:
push:
branches-ignore:
- gh-pages
jobs:
export_game:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Export
uses: firebelley/[email protected]
with:
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.2.2/mono/Godot_v3.2.2-stable_mono_linux_headless_64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.2.2/mono/Godot_v3.2.2-stable_mono_export_templates.tpz
relative_project_path: ./
create_release: false
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ../../../.local/share/godot/builds/HTML5/
TARGET_FOLDER: ${GITHUB_REF##*/}/game/
CLEAN: true
Now, in this yml we include the fix which is rather disgusting ../../../.local/share/godot/builds/HTML5/
. And well, frankly this is not desired. Our export_presets.cfg looks like this:
[preset.0]
name="HTML5"
platform="HTML5"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="HTML5/index.html"
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.0.options]
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/custom_html_shell=""
html/head_include=""
custom_template/release=""
custom_template/debug=""
I'm uploading my game to itch.io after running the export action and would like to pass the newly released version to itch.io as well. Could you add an output to the action containing the new version?
I'm using tags to generate my project's executable. The script I'm using is taken directly from the examples:
# Whenever tag in the form of `v1.0.0` is pushed then run the job
on:
push:
tags:
- 'v*'
jobs:
# job id, can be anything
export_game:
# Always use ubuntu-latest for this action
runs-on: ubuntu-latest
# Job name, can be anything
name: Export Game Job
steps:
# Always include the checkout step so that
# your project is available for Godot to export
- name: install wine
id: wine_install
run: |
sudo apt install wine64
echo ::set-output name=WINE_PATH::$(which wine64)
- name: checkout
uses: actions/[email protected]
# Ensure that you get the entire project history
with:
fetch-depth: 0
# separate step to extract the version from the tag name
- name: get tag from version
id: tag_version
run: |
echo ::set-output name=TAG_VERSION::${GITHUB_REF#refs/tags/v}
- name: export game
# Use latest version (see releases for all versions)
uses: firebelley/[email protected]
with:
# Defining all the required inputs
# I used the mono version of Godot in this example
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.4.2/Godot_v3.4.2-stable_linux_headless.64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.4.2/Godot_v3.4.2-stable_export_templates.tpz
relative_project_path: ./
create_release: true
base_version: ${{ steps.tag_version.outputs.TAG_VERSION}}
wine_path: ${{ steps.wine_install.outputs.WINE_PATH }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Whenever I push a new tag, the generated release notes are only showing the description from the last commit. Is this expected? How can it take into account all the commits since the last tag I've pushed?
I've set up a GitHub action using godot-export in my repository, the problem is when I get to the "export game" step I get the following error:
Using project file at /home/runner/work/squash-the-creeps/squash-the-creeps/my-3d-squash-the-creeps/project.godot
/home/runner/.local/share/godot/godot_executable/godot /home/runner/work/squash-the-creeps/squash-the-creeps/my-3d-squash-the-creeps/project.godot --export Linux/X11 /home/runner/.local/share/godot/builds/LinuxX11/squash_01-06-2021_01-06.x86_64 --verbose
ERROR: initialize: X11 Display is not available
At: platform/x11/os_x11.cpp:129.
Godot Engine v3.3.2.stable.official - https://godotengine.org
Error: The process '/home/runner/.local/share/godot/godot_executable/godot' failed with exit code 255
I don't see anything obviously wrong in my action (which was based in the example configuration) and the export settings used work locally.
Can someone lend me a hand? Thank you a lot!
The plugin isn't properly building a RELEASE build for Mac.
My configuration export specified 2 targets.
I have tried specifying the flag export_debug:false (as well as not specifying it). It doesn't seem to matter. My application still has App Title (Debug) in the titlebar. For the Windows build, it doesn't seem to be a problem (at least there is no (Debug) in the title bar when running that version.
Ubuntu latest now points to 20.04 in GitHub actions, and the current method of installing wine fails because of this. Only relevant when update_windows_icons
is set to true. Workaround is to use 18.04
explicitly for your workflow.
Docs: https://docs.github.com/en/rest/releases/releases#create-a-release
Overall, we would propably only need to add one flag to here:
Line 32 in 1e28506
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.