Build Unity projects for different platforms
Go to file
2019-12-22 22:43:47 +01:00
.github/workflows Allow builds for all targets 2019-12-22 22:43:47 +01:00
default-build-script Bring back meta file for builder 2019-12-08 00:48:22 +01:00
dist Make version pattern slightly less strict 2019-12-22 22:43:47 +01:00
src Make version pattern slightly less strict 2019-12-22 22:43:47 +01:00
test-project remove unnecessary tests 2019-12-22 22:43:47 +01:00
.dockerignore Cleanup 2019-12-22 22:43:47 +01:00
.editorconfig Add quality tools for javascript 2019-12-22 22:43:47 +01:00
.eslintignore Bootstrap docker from js 2019-12-22 22:43:47 +01:00
.eslintrc.json Run docker from javascript 2019-12-22 22:43:47 +01:00
.gitignore Package to dist folder using @zeit/ncc 2019-12-22 22:43:47 +01:00
.prettierignore Bootstrap docker from js 2019-12-22 22:43:47 +01:00
.prettierrc.json Add quality tools for javascript 2019-12-22 22:43:47 +01:00
.yarnrc Add quality tools for javascript 2019-12-22 22:43:47 +01:00
action.yml Cleanup 2019-12-22 22:43:47 +01:00
babel.config.js Run docker from javascript 2019-12-22 22:43:47 +01:00
Dockerfile Cleanup 2019-12-22 22:43:47 +01:00
entrypoint.sh Bootstrap docker from js 2019-12-22 22:43:47 +01:00
jest.config.js Run docker from javascript 2019-12-22 22:43:47 +01:00
LICENSE Add license (MIT) 2019-11-30 19:02:47 +01:00
package.json Run docker from javascript 2019-12-22 22:43:47 +01:00
README.md Rename BUILD_COMMAND to BUILD_METHOD 2019-12-08 02:02:32 +01:00
yarn.lock Run docker from javascript 2019-12-22 22:43:47 +01:00

Unity - Builder

Actions status


GitHub Action to build Unity projects for different platforms.

Part of the Unity Actions collection.


Github Action to build Unity projects for different platforms.

It is recommended to run the Test action from the Unity Actions collection before running this action. This action also requires the Activation step.

Documentation

See the Unity Actions collection repository for workflow documentation and reference implementation.

Usage

Create or edit the file called .github/workflows/main.yml and add a job to it.

name: Build project
on: [push]
jobs:
  buildForWebGL:
    name: Build for WebGL 🕸
    runs-on: ubuntu-latest
    steps:

Activate Unity in a step using the Unity Activate action.

Configure the builder as follows:

      # Configure builder
      - name: Build project
        id: buildStep
        uses: webbertakken/unity-builder@v0.2 # WIP (only webgl for now)
        env:  
          # Optional: Path to your project, leave blank for "./"
          UNITY_PROJECT_PATH: path/to/your/project

          # Name for your build
          BUILD_NAME: TestBuild

          # Optional: Builds path, leave blank for "build"
          BUILDS_PATH: build

          # Target platform for your build
          BUILD_TARGET: WebGL

          # Optional: <StaticBuildClass.StaticMethod> 
          BUILD_METHOD: ""

Note: By default the enabled scenes from the project's settings will be built.

You use the id to upload your built files like so:

      # Upload distributables
      - name: Upload Build
        uses: actions/upload-artifact@v1
        with:
          name: Build
          path: ${{ steps.buildStep.outputs.allBuildsPath }}

Return the Unity license in a final step using the Unity Return License action.

Commit and push your workflow definition.

More actions

Visit Unity Actions to find related actions for Unity.

Feel free to contribute.

Licence

MIT