Skip to content

Required Secrets

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

๐Ÿ” Secrets Setup

Can be found under:

Settings โ†’ Secrets and variables โ†’ Actions โ†’ Secrets

Secret Name Required Description
CICD_PAT โœ… A Personal Access Token with 'repo' and 'workflow' permissions
UNITY_EMAIL โœ… Unity account email
UNITY_PASSWORD โœ… Unity account password
UNITY_LICENSE โœ… Raw .ulf license contents
DISCORD_WEBHOOK โŒ Discord Webhook URL for optional CI notifications
SLACK_WEBHOOK โŒ Slack Webhook URL for optional CI notifications

๐Ÿ” Deployment Target Secrets

These are the required secrets for each optional deploy target, only include if needed:

Target Required Secrets
itch.io DEPLOY_API_KEY, ITCH_USERNAME, ITCH_PROJECT
testflight APPSTORE_API_KEY_ID, APPSTORE_API_ISSUER_ID, APPSTORE_API_PRIVATE_KEY
steam STEAM_USERNAME, STEAM_PASSWORD, STEAM_APP_ID

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:

  • Windows โ†’ C:\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_EMAIL โ†’ Your Unity account email.
  • UNITY_PASSWORD โ†’ Your Unity account password.
  • UNITY_LICENSE โ†’ Paste the full contents of your .ulf file.

โœ… 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

The CICD dispatcher relies on being able to call another workflow from CLI. A regular Git token will not suffice for this. In order to modify the project to create releases, the CICD_PAT will also be necessary to have those permissions


๐Ÿ”จ 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)
    7๏ธโƒฃ Add GitHub Secrets
    Go to your repository โ†’ Settings โ†’ Secrets and variables โ†’ Actions โ†’ Secrets โ†’ Add:
    Title: CICD_PAT
    Value: Paste your PAT into the value field
Clone this wiki locally