Automate Unity Android builds using GitHub Actions and Cake. Save time, avoid repetitive setup, and focus on game development.
🔹 v1.0.0 — game-ci (Unity Personal License)
Uses game-ci/unity-builder@v4. Works with Unity Personal.
- Import
ci-github-action-v1.0.0.unitypackage
into your project. - Configure
Assets/Plugins/CI/CIConfig.asset
. - Set the following GitHub secrets:
Secret Name | Description |
---|---|
UNITY_EMAIL |
Unity account email |
UNITY_PASSWORD |
Unity account password |
UNITY_LICENSE |
Content of base64 .ulf license |
-
Open Unity Hub on your local machine.
-
Go to
Preferences → Licenses → Manual Activation
. -
Follow the instructions and locate the
.ulf
file after activation:- Windows:
C:\ProgramData\Unity\Unity_lic.ulf
- macOS:
/Library/Application Support/Unity/Unity_lic.ulf
- Windows:
-
Open the file in a text editor and copy its full content.
-
Add it as
UNITY_LICENSE
in your GitHub repository secrets.
✅ Recommended Runner: game-ci/unity-builder@v4
🔹 v2.0.0 — Custom Docker Image (Unity Pro License Only)
Uses your own Docker image with pre-installed Unity Editor.
- Import
ci-github-action-v2.0.0.unitypackage
into the project. - Configure
CIConfig.asset
as usual. - Use this container section in your
yml
file:
container:
image: ghcr.io/sinlessdevil/unity-ci-image:2023.2.1f1
credentials:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.CR_PAT }}
- Manually activate Unity Pro license inside Docker.
- Unity Personal WILL NOT WORK in headless CI — it requires a display.
Secret Name | Description |
---|---|
USERNAME |
GitHub username (for Docker registry access) |
CR_PAT |
GitHub personal access token |
UNITY_EMAIL |
Optional, for in-container activation |
UNITY_PASSWORD |
Optional, for in-container activation |
-
This file does not build Unity itself.
-
Your method should be triggered via
Plugins.CI.Editor.Builder.*
-
The script is responsible for:
- Parsing logs
- Setting app version
- Tracking Git SHA / commits
- Optional test/log analysis
- Automatically runs when commit message contains
#build
- Unity Personal builds will fail inside Docker without GUI (headless limitation).
- If using a custom Docker image, you must activate Unity Pro license manually inside it.
- Unity activation can silently fail — always check
/root/activation.log
. - Make sure secrets are properly set, especially
USERNAME
,CR_PAT
. - GitHub caches Library folder by default. Invalidation relies on hashing
Assets
,Packages
,ProjectSettings
.
🔹 v3.0.0 — Local Builds via Unity Editor
Adds support for building directly inside Unity Editor (no Docker/GitHub Actions required).
Import ci-github-action-v3.0.0.unitypackage
into your project.
Call any of the following methods from Plugins.CI.Editor.Builder.cs
:
Builder.BuildAndroidAPK_Dev(); // Fast APK build
Builder.BuildAab(); // Release AAB build
- Runs build directly from Editor (ideal for local/dev use)
- Automatically skips
[Ignore]
d tests - Suppresses Unity splash screens & dialogs (headless-friendly)
- Supports silent builds, log parsing, versioning