Skipping the "what is CI/CD" intro — if you're on dev.to you already know. The Unity-specific part worth documenting: Unity needs a license activated before it'll build anything, even headlessly on a CI runner, which is the one piece that doesn't map cleanly from a normal Node/Python Actions setup.
GameCI (game.ci) handles this. The activation flow is annoying but one-time: run a temporary workflow using game-ci/unity-request-activation-file@v2, download the .alf artifact, upload it to license.unity3d.com, get back a .ulf file, store its contents as a UNITY_LICENSE secret along with your email/password. Delete the temp workflow after. Free Personal licenses work fine with this.
The build workflow itself is straightforward once that's done — game-ci/unity-builder@v4 takes care of activation, headless build, and deactivation:
yaml
strategy:
matrix:
targetPlatform: [StandaloneWindows64, Android]
steps:
- uses: actions/checkout@v4 with: { fetch-depth: 0, lfs: true }
- uses: actions/cache@v4 with: path: Library key: Library-${{ matrix.targetPlatform }}-${{ hashFiles('Assets/', 'Packages/', 'ProjectSettings/**') }}
- uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: { targetPlatform: ${{ matrix.targetPlatform }} }
The matrix strategy runs both platform builds in parallel, and caching the Library folder cuts significant time after the first run since Unity otherwise regenerates it from scratch.
Worth knowing before you set anything up: runner minutes aren't 1:1. Ubuntu is 1x, Windows 2x, macOS 10x. A build that costs 10 minutes on Ubuntu costs 100 on macOS — if you're doing iOS builds through Actions, your free 2,000 minutes disappear fast. Worth checking whether a self-hosted runner makes sense once build frequency scales up.
Full writeup with the secrets setup and common failure modes (license activation errors, cache key misses, YAML indentation issues): https://digitaltoolify.blogspot.com/2026/07/how-to-use-github-actions-automate-your.html
Anyone running self-hosted runners for Unity builds instead of GitHub-hosted? Curious what the actual cost/time tradeoff looks like in practice.
Top comments (0)