- Notifications
You must be signed in to change notification settings - Fork6
Build Types
This page explains howbuild types are determined and used in the CI/CD pipeline. Build types control how the system interprets incoming events, what kind of build or release it should execute, and what outputs are produced.
The system supports three main build types:
| Build Type | Description |
|---|---|
preview | For development, preview, or test builds (non-production) |
release_candidate | For staging builds, e.g.,v1.2.3-rc.1 |
release | For final production releases, e.g.,v1.2.3 |
The pipeline resolves the build type in the following order:
If the pipeline is run withTESTS_ONLY=true,
✅ italways forcesbuildType=preview.
This ensures that test-only runs don’t accidentally trigger release or candidate pipelines.
If amanual override is provided via input (BUILD_TYPE_OVERRIDE),
✅ it is acceptedonly if it’s one of:
previewrelease_candidaterelease
Invalid or unsupported types arenot allowed
because workflows are only dispatched byexplicit, validated choice
(e.g., through a manual dispatch form with dropdowns or options).
This guarantees no accidental or invalid values go in.
When no manual override is present, the pipeline inspects theGitHub event type andgit ref:
| GitHub Event | Git Ref Pattern | Resolved Build Type |
|---|---|---|
pull_request | (any) | preview |
push | refs/tags/vX.Y.Z (e.g.,v1.2.3) | release |
push | refs/tags/vX.Y.Z-rc.N (e.g.,v1.2.3-rc.1) | release_candidate |
push | anything else (branch pushes, etc.) | preview |
| other events | (fallback) | preview |
This ensures:
- Pull requestsalways run as previews.
- Tagged pushes (matching version or RC patterns)trigger releases.
- Regular branch pushesdefault to previews.
The systemrequires SemVer-compliant tags for releases and release candidates:
✅Release Tags:
- Must follow
vX.Y.Z(e.g.,v1.2.3)
✅Release Candidate Tags:
- Should ideally follow
vX.Y.Z-rc.N(e.g.,v1.2.3-rc.1) - If you dispatch only
v1.2.3and setrelease_candidateas the build type,
the systemcan automatically calculate the-rc.Nsuffix internally.
This allows flexible RC pipelines without requiring the exact RC tag to be inserted.
✅Preview Build (Pull Request)
A developer opens a pull request →buildType=preview
✅Preview Build (Manual Dispatch)
A developer manually dispatches the workflow
and explicitly selectspreview from thebuildType dropdown →buildType=preview
✅Release Candidate (Manual Dispatch)
A developer manually dispatches the workflow
withbuildType=release_candidate and base versionv2.0.0 → system calculatesv2.0.0-rc.N
✅Release Candidate (Tag Push)
A tag likev2.0.0-rc.3 is pushed →buildType=release_candidate
✅Final Release (Manual Dispatch)
A developer manually dispatches the workflow
withbuildType=release and versionv2.0.0 →buildType=release
✅Final Release (Tag Push)
A tag likev2.0.0 is pushed →buildType=release
If you’re unsure which build type your workflow will resolve to, check:
- The workflow logs → look for theResolved build type log line. In the dispatcher, you'll find it in the
Prepare Metadataworkflow. - The value of
$BUILD_TYPEor$buildTypein later workflow steps.
Let’s build better Unity pipelines together! 🚀
Need help? Join theDiscussions or open anIssue.