Skip to content
Astrid Avalin Soerensen edited this page May 11, 2025 · 11 revisions

πŸ›  Setup & Configuration

This page explains how to set up your Unity-CI-Templates environment, configure required secrets, and control pipeline variables.


πŸ”‘ Required Secrets

You must add these under your repository:
GitHub β†’ Settings β†’ Secrets β†’ Actions

Secret Name Description
UNITY_LICENSE Base64-encoded Unity license file or .ulf string
UNITY_EMAIL Unity account email address
UNITY_PASSWORD Unity account password
CICD_PAT GitHub Personal Access Token for workflow dispatch

πŸ“– See detailed setup for each secret:
Required Secrets


βš™οΈ Optional Secrets (Per Deploy Target)

Depending on your deploy targets, you may also need:

Secret Name Purpose
SLACK_WEBHOOK Slack webhook URL for notifications
DISCORD_WEBHOOK Discord webhook URL for notifications
ITCH_USERNAME itch.io username for Butler uploads
ITCH_PROJECT itch.io project identifier
FIREBASE_TOKEN Firebase CLI authentication token
AWS_ACCESS_KEY_ID AWS key for S3 deploy
AWS_SECRET_ACCESS_KEY AWS secret for S3 deploy
(and others β€” see Deployment Guide)

πŸ“‹ Example Parameters

Parameter Description
UNITY_VERSION Unity version (e.g., 2022.3.14f1)
PROJECT_NAME Project name used in builds/artifacts
BUILD_TARGETS JSON array of build targets (e.g., [ "WebGL" ])
DEPLOY_TARGETS JSON array of deploy targets (e.g., [ "gh-pages" ])
USE_GIT_LFS Whether to enable Git LFS (default: false)
EXCLUDE_UNITY_TESTS Whether to skip tests (default: false)

πŸ— Example .github/config Files

For fallback defaults, you can create these files in .github/config:

  • defaults.json β†’ Defines fallback values for pipeline variables.
  • deploy-targets.json β†’ Maps deploy targets to required OS.
  • target-platforms.json β†’ Lists supported Unity build platforms.

πŸ’‘ Note: Repository variables override config files, and manual workflow inputs override both.

The architecture of the .config files can be found here


πŸ† Parameter Resolution Priority

When the pipeline resolves parameters (like unityVersion, buildType, deployTargets), it follows this priority order:

Priority Rank Source Description
πŸ₯‡ 1 Workflow Dispatch Inputs Passed when manually running workflows via the GitHub UI or gh workflow run
πŸ₯ˆ 2 Repository Variables Set under Settings β†’ Variables β†’ Actions in your GitHub repository
πŸ₯‰ 3 Config Files Fallback defaults stored in .github/config/*.json (e.g., defaults.json)

For example:

  • If you set inputs.unityVersion in a manual run, it overrides both the UNITY_VERSION repo variable and the defaults in the config file.
  • If no manual input is provided, the pipeline checks for a repository variable.
  • If neither is provided, the pipeline falls back to the config file.

Tip:
You can check or change repository variables under GitHub β†’ Settings β†’ Variables β†’ Actions.
Config files live in .github/config/ and define project-wide defaults.

Clone this wiki locally