Skip to content

Required Secrets

Astrid Avalin Soerensen edited this page May 6, 2025 · 15 revisions

UNITY_LICENSE: Unity License Setup for CI/CD

To run Unity builds and tests in this CI/CD pipeline, you must activate a Unity license for use inside GitHub Actions.

This guide explains how to prepare and securely store your Unity license, depending on your license type.

👉 Reference: GameCI Unity Activation Docs


🎮 Supported License Types

License Type Setup Section
Unity Personal (Free) Personal License Setup
Unity Plus / Pro (Paid) Professional License Setup
License Server License Server Setup

🏗️ Personal License Setup

Use this if you’re using the free Unity Personal license.

1️⃣ Activate Locally
On your machine, open Unity Hub → Preferences → Licenses → Add
Select Get a free personal license → Complete activation.

2️⃣ Locate .ulf File
After activation, find the license file:

  • WindowsC:\ProgramData\Unity\Unity_lic.ulf
  • macOS/Library/Application Support/Unity/Unity_lic.ulf
  • Linux~/.local/share/unity3d/Unity/Unity_lic.ulf

3️⃣ Add GitHub Secrets
Go to your repository → Settings → Secrets and variables → Actions → Secrets → Add:

  • UNITY_LICENSE → Paste the full contents of your .ulf file.
  • UNITY_EMAIL → Your Unity account email.
  • UNITY_PASSWORD → Your Unity account password.

✅ Done! Your CI/CD pipeline can now activate the license during test and build steps.


Unfortunately no support for pro-licenses as of now, at least I haven't tested it.

CICD_PAT: Personal Access Token for CI/CD

To allow your GitHub Actions CI/CD pipeline to perform advanced tasks like triggering workflows, creating releases, or managing artifacts across workflows or repositories, you need to provide a Personal Access Token (PAT).

By default, GitHub Actions only has access to the built-in ${{ secrets.GITHUB_TOKEN }}, which works inside a single workflow run but has limitations when triggering other workflows or accessing external resources. That’s why we need a separate PAT.


📋 Why Do We Need CICD_PAT?

Here’s what the CICD_PAT enables: ✅ Triggering other workflows (e.g., workflow_dispatch from one workflow to another)
✅ Creating or modifying releases (especially across repos)
✅ Uploading or downloading artifacts across repositories
✅ Accessing private repos or organization resources from scripts
✅ Bypassing some permission limits of the default GITHUB_TOKEN

Without this token, many cross-workflow or multi-repo automations will fail due to permission errors.


🔨 How to Create CICD_PAT

1️⃣ Go to GitHub → Your Profile → Settings → Developer Settings → Personal Access Tokens → Tokens (classic)
👉 Direct Link: https://github.com/settings/tokens

2️⃣ Click “Generate new token (classic)”

3️⃣ Name your token something clear, e.g., cicd-pat

4️⃣ Set Expiration → Choose a reasonable expiration (recommend renewing regularly)

5️⃣ Select Scopes (Permissions):

  • repo → Full control of private repositories (needed for workflows touching code, releases, or artifacts)
  • workflow → Update GitHub Action workflows, trigger workflow runs

6️⃣ Generate Token → Copy it once (you won’t be able to see it again)


🔐 Add the Token to GitHub Secrets

1️⃣ Go to your repository → Settings → Secrets and variables → Actions → Secrets

2️⃣ Add new secret:

  • Name: CICD_PAT
  • Value: Paste your PAT

Clone this wiki locally