Giter Site home page Giter Site logo

boyquotes / setup-godot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chickensoft-games/setup-godot

0.0 0.0 0.0 3.42 MB

Setup Godot for headless use with macOS, Windows, and Linux CI/CD runners.

License: MIT License

JavaScript 0.56% TypeScript 99.44%

setup-godot's Introduction

๐Ÿค– Setup Godot

Chickensoft Badge Discord Read the docs

Setup Godot for use with (or without) .NET on macOS, Windows, and Linux CI/CD runners.

  • โœ… Installs Godot 4.x
  • โœ… Installs export templates.
  • โœ… C# supported using .NET version of Godot.
  • โœ… Versions without .NET are also supported.
  • โœ… Installs Godot directly on the CI/CD runner.
  • โœ… Caches Godot and export template installation for speedier workflows.
  • โœ… Adds environment variables (GODOT4, GODOT) to the system path.
  • โœ… Runs on macOS Github Actions runner.
  • โœ… Runs on Windows Github Actions runner.
  • โœ… Runs on Ubuntu Github Actions runner.

Godot 3.x and below are not supported.

Usage

Example workflow:

name: ๐Ÿšฅ Status Checks
on: push

jobs:
  tests:
    name: ๐Ÿ‘€ Evaluate on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      # Don't cancel other OS runners if one fails.
      fail-fast: false
      matrix:
        # Put the operating systems you want to run on here.
        os: [ubuntu-latest, macos-latest, windows-latest]
    env:
      DOTNET_CLI_TELEMETRY_OPTOUT: true
      DOTNET_NOLOGO: true
    defaults:
      run:
        # Use bash shells on all platforms.
        shell: bash
    steps:
      - uses: actions/checkout@v3
        name: ๐Ÿงพ Checkout

      - uses: actions/setup-dotnet@v3
        name: ๐Ÿ’ฝ Setup .NET SDK
        with:
          # Use the .NET SDK from global.json in the root of the repository.
          global-json-file: global.json

      - name: ๐Ÿ“ฆ Restore Dependencies
        run: dotnet restore

      - uses: chickensoft-games/setup-godot@v1
        name: ๐Ÿค– Setup Godot
        with:
          # Version must include major, minor, and patch, and be >= 4.0.0
          # Pre-release label is optional.
          version: 4.0.0-beta16 # also valid: 4.0.0.rc1 or 4.0.0, etc
          # Use .NET-enabled version of Godot (the default is also true).
          use-dotnet: true

      - name: ๐Ÿ”ฌ Verify Setup
        run: |
          dotnet --version
          godot --version

      - name: ๐Ÿง‘โ€๐Ÿ”ฌ Generate .NET Bindings
        run: godot --headless --build-solutions --quit || exit 0

      - name: ๐Ÿฆบ Build Projects
        run: dotnet build

      # Do whatever you want!

Inputs

See action.yml for the complete guide to all of the action's inputs.

Specifying the Godot Version

The Godot version should be specified the same as any GodotSharp version string: e.g., 4.0.0-beta1, 4.0.0-beta.16, 4.0.0, etc.

In place of a version, you can specify global or global.json to use the version of Godot specified by the project's global.json file.

  - uses: chickensoft-games/setup-godot@v1
    name: ๐Ÿค– Setup Godot
    with:
      version: global.json # use Godot version specified by global.json

For that to work, your project must have a global.json file in the root directory with contents similar to the following.

{
  "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. Note that Godot tends to add this back to your .csproj file every time you save the Godot project, so discard those changes before committing to source control.

<Project Sdk="Godot.NET.Sdk"> <!-- GOOD -->
<Project Sdk="Godot.NET.Sdk/4.0.0"> <!-- BAD -->

setup-godot's People

Contributors

dependabot[bot] avatar jolexxa avatar theorioli avatar

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.