name: 'Setup Godot Action'
description: >-
  Setup Godot for headless use with macOS, Windows, and Linux CI/CD runners.
author: 'Chickensoft'
branding:
  icon: 'hard-drive'
  color: 'white'
inputs:
  version:
    description: >-
      Godot 4 version: e.g., 4.0.0-beta1, 4.0.0-beta.16, 4.0.0, etc. Must include major, minor, and patch (additional pre-release label is optional). Specify `global` or `global.json` to use the version from the project's global.json file.

      ```yaml
      - uses: Mimyr-Games-LTD/setup-godot-custom@v1
        with:
          version: global
      ```

      In the root of your project, include a global.json file:

      ```json
      {
        "sdk": {
          "version": "6.0.406",
          "rollForward": "latestMinor"
        },
        "msbuild-sdks": {
          "Godot.NET.Sdk": "4.0.0"
        }
      }
      ```

      **Important:** If using a global.json file in your project, do *not* specify the version of the Godot.NET.Sdk in your project's `*.csproj` file.

      ```xml
      <Project Sdk="Godot.NET.Sdk"> <!-- GOOD -->
      <Project Sdk="Godot.NET.Sdk/4.0.0"> <!-- BAD -->
      ```
    required: true
  custom_url:
    description: >-
      Optional custom URL to download a custom Godot build. If set, the action will
      download and use this build instead of determining a version from `version`.
      Example:
      ```yaml
      - uses: Mimyr-Games-LTD/setup-godot-custom@v1
        with:
          custom_url: 'https://example.com/my_custom_godot_build.zip'
      ```
    required: false
    default: ''
  path:
    description: >-
      Path to install Godot to, relative to the current working directory of
      the action.
    default: 'godot'
  downloads-path:
    description: >-
      Path to download Godot to, relative to the current working directory of
      the action.
    default: 'downloads'
  bin-path:
    description: >-
      Path for binaries to be installed to, relative to the current working
      directory of the action. This is the path that will be added to the
      system path.
    default: 'bin'
  godot-sharp-release:
    description: >-
      Whether to use the release or debug version of GodotSharp.dll. The
      appropriate version will be symlinked in bin-path.
    default: 'false'
  use-dotnet:
    description: >-
      True to use the .NET-enabled version of Godot that enables C#, false to use the default version.
    default: true
  include-templates:
    description: >-
      True will also download the Godot Export Templates for each platform.
    default: false
  cache:
    description: >-
      True to cache downloads.
    default: true
runs:
  using: 'node20'
  main: 'dist/index.js'
