Git Product home page Git Product logo

unity_build_action's Introduction

Unity Build For Self-Hosted Runner

Description

This GitHub Action allows you to automate the process of building a Unity project for the Windows 64-bit platform using a self-hosted runner. It facilitates the build process, ensuring that the necessary steps are executed smoothly.

Inputs

  • unityPath (required): The full path to the Unity executable.
  • buildPath (required): The path where the build artifacts will be stored.
  • executeMethod (required): The name of the Unity method to execute during the build.
  • extraArgument (required): Extra arguments to pass to the Unity build command.
  • projectPath (optional): The path to the Unity project. Default is the root of the repository.
  • exeFileName (required): The name of the .exe file to check for in the build folder.

Runs On

This action runs using a composite run strategy, ensuring efficient execution of the defined steps.

Steps

  1. Check if Build Folder Exists: Verifies if the build folder already exists.
  2. Remove Existing Build Folder: Removes the existing build folder if it exists.
  3. Create Build Folder: Creates a new build folder.
  4. Unity Build: Executes the Unity build process based on the provided inputs.
  5. Check for Custom .exe File: Verifies if the custom .exe file exists in the build folder.

Usage

To use this action, follow the steps below:

  1. Configure your GitHub workflow to include this action.
  2. Provide the necessary inputs such as unityPath, buildPath, executeMethod, extraArgument, and exeFileName.
  3. Run your workflow, and the action will handle the Unity build process for you.

Example Workflow

name: Unity Build Workflow

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: self-hosted
    steps:
    - name: Checkout Repository
      uses: actions/checkout@v2
      
    - name: Unity Build
      uses: cycleapple/unity-build-action@v1
      with:
        unityPath: '/path/to/unity/executable'
        buildPath: './Build'
        executeMethod: 'BuildPipeline.BuildPlayer'
        extraArgument: '-developmentBuild'
        projectPath: './UnityProject'
        exeFileName: 'MyGame'

License

This action is licensed under the MIT License. Feel free to modify and use it according to your needs.

unity_build_action's People

Contributors

cycleapple avatar

Watchers

 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.