Giter VIP home page Giter VIP logo

godot-export's Introduction

Godot Export

A workflow action to automatically export your Godot games. Supports standard and Mono builds!

Contents

How it Works

This action automatically reads your export_presets.cfg file to determine which builds to make. Whenever this action runs each of your defined exports will run. The resulting executables can then be optionally attached to a release. See the example configuration.

Setting Up Export Presets

Define at least 1 export preset by going to Project -> Export in the Godot editor and creating a configuration. Set the file name in the "Export Path" box. This is how the action knows how to name your binary. Notice how the below image has "win.exe" in the "Export Path" for my windows export. Your executables can be named however you like, as long as they include the appropriate extension .exe, .x86_64, etc.

NOTE: The file extension for the Mac OSX export must be anything but .zip for versions of Godot before 3.2. If the Mac OSX export file extension is .zip for a Godot version earlier than 3.2, then your project source files will be exported instead of a Mac application. This was a known issue with the Godot command line export. For reference, I used a .z file extension to make it work for my Mac OSX builds.

Workflow Configuration

Action Inputs

Input Name Description Type Default Required
godot_executable_download_url The Linux Headless version of Godot that you want to use to export your project. If you do not use the Linux Headless version exporting will fail. string Yes
godot_export_templates_download_url The link to the .tpz archive of export templates. string Yes
relative_project_path The relative path to the directory containing your project.godot file. If your project.godot file is at the root of your repository then this value should be ./. Do not include project.godot as part of this path. string Yes
cache Use the GitHub Actions workflow cache to cache the Godot export templates and Godot executable. Helps speed up builds by not having to download them every time. boolean false No
export_debug Export builds in debug mode. boolean false No
archive_output Archive each export into a .zip file. boolean false No
archive_root_folder Place exported files under a root folder when archiving, rather than placing the files themselves at the root of the archive. boolean false No
relative_export_path Move exports to the provided directory relative to the root of the Git repository. NOTE: This setting is overridden by use_preset_export_path. string '' No
use_preset_export_path Move exports to the directory defined in export_presets.cfg relative to relative_project_path. In other words, exports will use the export path specified in the export preset in relation to the location of the project.godot file. Prioritized over relative_export_path. boolean false No
wine_path The absolute path to the wine binary. If specified, Godot will use this to run rcedit to update Windows exe icons. See the setup Windows icons example configuration. string '' No
verbose Use the --verbose flag when exporting. boolean false No
use_godot_3 Build using Godot 3 executable. NOTE: godot_executable_download_url and godot_export_templates_download_url still need to be configured to download the correct version. boolean false No
export_as_pack Export project files as a .pck file boolean false No

Action Outputs

Output Name Description Type
build_directory The directory containing the raw (unarchived) exported files. Note that the inputs relative_export_path and use_preset_export_path do not change this output value. string
archive_directory The directory containing archived exports. This directory will be empty if archive_output is not set. Note that the inputs relative_export_path and use_preset_export_path do not change this output value. string

Example Configuration

Below is a sample workflow configuration file utilizing this action. This example workflow could be defined in .github/workflows/main.yml. For more information about defining workflows see the workflow docs.

This workflow will export your game when a tag is pushed, archive the files, and create a release containing the archives.

# 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: write-all
    # 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://downloads.tuxfamily.org/godotengine/4.0/Godot_v4.0-stable_linux.x86_64.zip
        godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/4.0/Godot_v4.0-stable_export_templates.tpz
        relative_project_path: ./
        archive_output: 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: ${{ github.ref_name }}
        artifacts: ${{ steps.export.outputs.archive_directory }}/*

Custom Editor Settings

Some Godot configurations are editor-based and not project-based. This includes items 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 file by simply copying your custom editor settings file to ~/.config/godot/editor_settings-4.tres before this action runs. This action will not overwrite an existing editor_settings-4.tres file.

Mono Builds

Mono builds do not require additional configuration. However, if you want to change the build tool that is used (currently defaults to dotnet cli) then you need to supply your own editor settings with the line mono/builds/build_tool. This value corresponds to the build tool dropdown in the editor settings window at Editor Settings -> Mono -> Builds -> Build Tool. You can look at your local editor_settings-3.tres to see what this value should be if you want to match the build tool used during local development.

Android Builds

For Android builds, use the setup-android action before this one in your workflow. The default editor settings file used by this action already provides a default path to the Android SDK. If your path is different then supply your own editor settings file.

Tips

Supplying a Custom Editor Settings File

Include the following step before this action. For example:

# Above this line is the workflow job setup
- name: use custom editor settings
  run: |
    mkdir -p ~/.config/godot
    cp ~/path/to/my/editor_settings-3.tres ~/.config/godot/
# Note that you can use ${{ github.workspace }} to get the default location of your checked-out repository
# Use firebelley/godot-export sometime after the above step

Setup Windows Icons

In order to configure this action to update your game's Windows exe icon, include the following configuration:

- name: install wine
  id: wine_install
  run: |
    sudo apt install wine64
    echo "WINE_PATH=$(which wine64)" >> $GITHUB_OUTPUT

# Any other intermediate steps can go here

- name: export game
  uses: firebelley/[email protected]
  with:
    # ...supply your other options here
    wine_path: ${{ steps.wine_install.outputs.WINE_PATH }} # set the wine path here which is the output of the wine_install step

Example Projects

See the example projects for more info.

godot-export's People

Contributors

antoniodell avatar bluenix2 avatar bram-dingelstad avatar dardanbujupaj avatar dependabot[bot] avatar firebelley avatar isjaslaweisenstadt avatar izzint avatar mockersf avatar ndarilek avatar nice-shot avatar spartan322 avatar thefireflyer avatar tylerecouture avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot-export's Issues

Template name error when using RC/Beta versions

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.

Obtain new release version after export

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?

If relative_project_path is set, it should be appended when use_preset_export_path

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

Keystore passwords for android build

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:

  • add a new configuration flag to your action called 'keystore-password'
  • if set - replace/add both 'keystore/debug' and 'keystore/release' with this password (anyway only one of them will be released)
  • optional - revert presets file changes back (as somebody may want to do something else with the original passwords - not really probable, but with github reset it should not be a problem)

Executable not archived

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

Include export directory itself in release archives

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:

  • My export preset is called Game-Linux-X11-amd64
  • Currently, the zip in the generated release looks like this:
    - Game-Linux-X11-amd64.zip
    |-- Game.pck
    |-- Game.x86_64
    
  • I would like it to look like:
    - Game-Linux-X11-amd64.zip
    |-- Game-Linux-X11-amd64
      |-- Game.pck
      |-- Game.x86_64
    

Release customization

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...

Unable to locate executable file: godot.

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.

Make godot verbose build optional

See

const result = await exec('godot', [projectPath, exportFlag, preset.name, executablePath, '--verbose']);

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

Mac build failing on ubuntu-latest

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:

  • name: mac
  • export path: builds/stream-captions.zip
  • bundle identifier: com.sinnom.stream-captions

Blender Import Support

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

ERROR: initialize: X11 Display is not available

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!

add-path warning - will be disabled soon

When using this firebelley/godot-export, on v2.4.0

- name: export game
  uses: firebelley/[email protected]

My pipeline started giving me this error,

image

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,

core.addPath(path.dirname(finalGodotPath));

Error during first build: not a directory, scandir

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

Support for OS X builds in Godot 3.3+

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

Workflow action doesn't read export path

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=""

Incorrect configuration file for Godot 4 Android support

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.

image

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

Can't compile windows binaries

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?

Mac build only exporting Debug

The plugin isn't properly building a RELEASE build for Mac.

My configuration export specified 2 targets.

  • macOS
  • windows

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.

Here is a screenshot of my current config:
Screen Shot 2022-11-01 at 7 41 35 AM

Android export

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!

Ability to chose export location

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

Release notes show only last commit

I'm using tags to generate my project's executable. The script I'm using is taken directly from the examples:

Workflow script
# 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?

Attempting to run Action causes errors that don't exist locally followed by indefinite hang

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 ERRORs 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)
     ```

Feature Wish: inject commands before exporting

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

Allow passing path to executable and export templates tpz instead of url

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

Update README for Ubuntu 20.04 & Godot Mono Prerequisite

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.

Still requires `GITHUB_TOKEN` if `create_release` is false

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.

Export for Windows failing (missing template)

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

Android export: more docs and sensible defaults

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:

  • Does the action include the Android installation?
    • answer: no
  • How do I easily install Android?
  • Android is set-up, but I still get errors. The SDK path is not valid, says Godot.
    • answer: it turns out that the default SDK config looked like it was compatible with 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:

  • Do you think we should give a guide through these steps?
  • Should we change the default values?

If you agree with those, I could handle it if you want.

Thanks ๐Ÿค—

Custom editor settings are always overwritten

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.

Add auxiliary files to release archive

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.

Avoid archiving single file output

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] Export for Android not working (ADB and Debug keystore not configured)

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

Wine install fails for ubuntu latest (20.04)

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.

Run on tag creation

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?

Unexpected input(s) 'verbose'

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']

Make GitHub Release Executables Optional

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.