CI/CD Guide

How to Automate Unity iOS Builds with GitHub Actions

Updated August 2026 · 10 min read · by the MacFree team
Short answerGitHub Actions can build, sign and ship Unity iOS games using hosted macOS runners — no Mac needed. You'll need a Unity licence activated on the runner, your signing certificate and profile stored as encrypted secrets, and an App Store Connect API key for the upload. Expect to spend real time on disk space, licensing and keychain issues.

GitHub Actions is the most flexible way to build Unity iOS games without a Mac — and the most work. Here's the pipeline shape, plus the failures that eat the most time.

The pipeline shape

A working Unity iOS pipeline has two jobs, and splitting them matters for cost:

  1. Build (Linux runner) — install Unity, activate the licence, export the Xcode project. Linux minutes are far cheaper than macOS minutes, and this is the long step.
  2. Ship (macOS runner) — import signing material, archive with Xcode, export the IPA, upload to App Store Connect.

Running everything on macOS works but wastes money: macOS minutes are billed at a large multiple of Linux minutes, and the Unity compile is the slowest part.

What you need as repository secrets

The failures that will cost you a day each

Runner disk space

The Unity iOS build image is large, and GitHub's Linux runners ship with limited free space plus a lot of preinstalled tooling. Builds fail with no space left on device partway through unpacking. The fix is to delete unused toolchains (dotnet, Android SDK, GHC, CodeQL) and prune Docker images before the build step.

Unity licence activation

Headless activation fails silently in confusing ways if the serial is missing — the log reports "0 entitlement groups" and the build dies much later with a licence error. Supply serial, email and password; don't rely on email/password alone.

Code signing on the runner

Three specific traps:

Artifact permissions

upload-artifact does not preserve the executable bit. Unity's Xcode project runs helper binaries during the archive, so they fail with Permission denied after a round trip. Tar the build output before uploading and untar it on the macOS job — a tar preserves file modes.

Apple's moving SDK floor

Apple periodically raises the minimum SDK. Runners default to an older Xcode even when newer versions are installed, so uploads get rejected. Select the newest installed Xcode explicitly rather than trusting the default.

Is it worth building yourself?

If you enjoy infrastructure and want total control, yes — GitHub Actions is powerful and can be nearly free at low volume.

If you'd rather ship your game, the trade is stark: the pipeline above is a few hundred lines of YAML plus the debugging cycles that come with it, and every failure costs 15–25 minutes of build time to discover. MacFree drives GitHub Actions for you — it generates the workflow, creates and pins the signing material, and handles every issue listed above — from a button inside the Unity Editor.

Keep GitHub Actions. Skip the YAML.

MacFree configures the workflow, secrets and signing for you, then ships to TestFlight.

Get MacFree on the Unity Asset Store →

Frequently asked questions

Can GitHub Actions build Unity iOS games?

Yes. Hosted macOS runners can install Unity, activate a licence, export the Xcode project, code-sign and upload to TestFlight. Signing material and Unity credentials are supplied as encrypted repository secrets.

Why does my Unity build fail on a GitHub Actions runner?

Most often: running out of disk space unpacking the Unity image, licence activation failing because no serial was supplied, or signing failing because the certificate's private key or the profile isn't in the runner keychain.

Is GitHub Actions free for Unity iOS builds?

GitHub includes a monthly free minute allowance that can cover a small project. macOS minutes consume it faster than Linux minutes, so larger or more frequent builds eventually incur GitHub charges.