-
Notifications
You must be signed in to change notification settings - Fork 8
Versioning & Tagging
Astrid Avalin Soerensen edited this page May 4, 2025
·
10 revisions
This page explains how the CI/CD pipelines handle versioning and Git tagging for preview, release candidate, and release builds.
The Version Resolver workflow automatically determines the correct version string based on:
- β
Build type (
preview,release_candidate, orrelease) - β Git context (tag push, branch, pull request, or manual input)
- β Optional manual version input
| Build Type | Resolved Version Example |
|---|---|
| release |
v1.2.3 (from Git tag or manual input) |
| release_candidate |
v1.2.3-rc.1 (auto-generated or based on input) |
| preview |
manual-main, main, or PR-0001 (branch or PR-based) |
- β
Manual override β If
versioninput is provided, itβs used directly (except inrelease, where Git tag takes priority). - β
RC auto-generation β Automatically increments
-rc.Nsuffix based on the latest matching base tag. - β
Pull request builds β Use
PR-XXXXformat. - β
Branch-based builds β Use branch name (
main,feature-branch), replacing/with-. - β
Fallback β Short commit SHA (
commit-abc123).
- For
releasebuilds, you must push a valid Git tag (e.g.,v1.2.3) or provide a valid manual version. - If a resolved version already exists as a tag (outside a tag-push), the workflow fails early to prevent accidental overwrites.
The Version Tagger workflow ensures Git tags are correctly created or verified:
- β For release and release_candidate builds only (skipped for preview)
- β Checks if the requested tag already exists
- β If missing, creates the tag using the GitHub API
-
Inputs
-
version: required (e.g.,v1.2.3orv1.2.3-rc.1) -
buildType: required
-
-
Tag Check
- Uses
.github/scripts/tagging/check-tag-exists.shto verify if the tag exists.
- Uses
-
Tag Creation (if needed)
- Uses
.github/scripts/tagging/create-tag.shto create the new tag.
- Uses
-
Summary Reporting
- Outputs whether the tag already existed or was newly created.
| Build Type | Tag Created? |
|---|---|
| preview | No tagging performed |
| release_candidate | Tag like v1.2.3-rc.1 created if missing |
| release | Tag like v1.2.3 created if missing |
At the end of each workflow, you get:
- β Build type and trigger
- β Resolved version
- β Whether the tag already existed or was newly created
β οΈ Any warnings (e.g., version collisions)
You can view these summaries directly in the GitHub Actions run summary.
-
Manual builds β Trigger builds manually using
workflow_dispatchand provide aversioninput. -
Automated builds β For release workflows, pushing a properly named Git tag (e.g.,
v1.2.3) triggers the correct flow. -
RC versioning script β Located at
.github/scripts/build/version-generator-for-rc.sh, this handles incrementing-rc.Nsuffixes.
Letβs build better Unity pipelines together! π
Need help? Join the Discussions or open an Issue.