Git Product home page Git Product logo

godot-setup's Introduction

Godot Setup

Godot Version Build

GitHub action to setup the Godot game engine so it can run in graphical mode (i.e. non-headless) on Linux, Windows, and macOS.

This can be useful if you want to test something graphical or platform-specific.

The downloaded Godot executable will is cached for subsequent runs if the cache input is set to true (default).

Usage

- name: Setup Godot
  uses: lihop/setup-godot@v2

# You can now run the downloaded version of godot using the `godot` command in your other steps.
# For example, run Gut tests:
- name: Run tests
  shell: bash
  run: godot --no-window -s addons/gut/gut_cmdln.gd -gexit

# You can use the `alias` input if you want to use a different name for the Godot executable
# or use different names for different versions. For example:
- name: Install Godot Mono v3.4-beta5
  uses: lihop/setup-godot@v2
  with:
    mono: true
    version: 3.4-beta5
    alias: my-custom-name

# Now you can execute the Godot version above using `my-custom-name`.
- name: Print version
  run: my-custom-name --version
  # Will print: `3.4.beta5.mono.official.dd0ee4872`.

# You can also download export templates if you plan to export projects.
# The downloaded export templates will be cached along with the Godot executable if the `cache` input is set to `true` (default).
- name: Install Godot 3.4.4-stable
  uses: lihop/setup-godot@v2
  with:
    version: 3.4.4-stable
    export-templates: true

# Now you can export a run a godot project (this example uses named exports specified in the projects export_presets.cfg file).
- name: Export project
  run: godot --no-window --export "Linux/X11"

# For Linux runners the setup-godot action will start an Xserver and export the DISPLAY environment variable as appropriate.
# This means you can run the exported project without having to set up an Xserver or use `xvfb-run`.
# For Windows runners the action will setup OpenGL using [mesa-dist-win](https://github.com/pal1000/mesa-dist-win).
# macOS runners support OpenGL applications out of the box.
- name: Run exported project
  run: ./exports/linux.64/MyCoolGame.x86_64

Options

Name Default Description
version "3.5-stable" Godot version to use
bits 64 64 or 32 bit build
mono false Use the Mono build
alias "godot" Name of the Godot executable that will be added to PATH
cache true Whether to save/restore Godot (and export templates if downloaded) to/from cache
export-templates false Download export templates

godot-setup's People

Contributors

dependabot[bot] avatar lihop avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

godot-setup's Issues

Download export templates

Add boolean export_templates option.
If true export templates for the specified version will be downloaded and cached along with Godot.

Make action a "composite" action

Using actions/github-script would make it possible to run the index.js script via a composite action. Using a composite action will allow us to perform other actions (such as installing mesa-dist-win) using other dedicated actions rather than our home-made ones.
index.js will need to be updated to export the main function and take core, exec, and github as inputs.

runs:
  using: "composite"
  steps:
    - name: Setup Godot
      uses: "actions/github-script@v7"
      with:
        script: |
          const script = require("${{github.action_path}}/index.js")
          script({core, exec, github})

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.