CI pipeline with Unity in Github Actions

featured image

We’re building a couple of demo games to demonstrate our technology for multiplayer game servers. We use Github for hosting our git repositories and when we were to select a CI/CD system we elected to test Github Actions (it’s not quite the best branded product I’ve seen?). In our past careers we’ve tried most CI/CD systems and thought that Actions looks like it could fit our needs.

A couple of our demo games are built in Unity, some in Unreal. The build pipelines are quite different depending on the game engine. I’m only going to write about Unity here, we still haven’t set up a good pipeline for Unreal.

Caveat: Different features from Github Actions are available depending on your plan with Github. The “Environments” feature is restricted to only some subscription plans.

The excellent people over at has already done the heavy lifting of packaging Unity builds into Github Actions (and other build tools), I can highly recommend it.

You need first to get your activation code. Follow the steps at We changed it so it doesn’t trigger on all pushes, this is a one time job really. We took the results from there and added it to Github Actions -> secrets -> UNITY_LICENSE.

Second job is the actual build job. We took most of the template straight from We added a projectPath to get our build to match our directory structure and we also added a discord notifier to notify the team what the final status of the build job was.

Complete code for this build:

name: Build

  pull_request: {}
  push: { branches: [main] }


    name: Build my project ✨
    runs-on: ubuntu-latest
      # Checkout
      - name: Checkout repository
        uses: actions/checkout@v2
          lfs: true

      # Cache
      - uses: actions/cache@v1.1.0
          path: Library
          key: Library

      # Build
      - name: Build project for Windows
        uses: webbertakken/unity-builder@v0.10
          unityVersion: 2019.4.3f1
          targetPlatform: StandaloneWindows
          projectPath: Scratch

      # Output
      - uses: actions/upload-artifact@v1
          name: Build
          path: build
      # Status to Discord
      - name: Send status to Discord
        uses: nebularg/actions-discord-webhook@v1
          webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
          status: ${{ job.status }}
        if: always() # or failure() or success()

comment icon 0

Senaste inlägg

February 1,2022   •   2 min läsning

This is a follow up post to our last one regarding the launch of our platform. Welcome (or welcome again)! We have always valued communication with you…

comment icon 0