A GitHub Action for Unity projects that creates and applies pull-request labels
based on the Unity bundleVersion stored in
ProjectSettings/ProjectSettings.asset.
Designed for teams using trunk-based development and continuous delivery.
Automatically:
- Detects
bundleVersionchanges in pull requests - Creates semantic version labels (
vX.Y.Z) - Applies the correct version label when pull requests are merged
This makes Unity versions visible, queryable, and auditable directly in GitHub.
Below is an example of merged pull requests automatically labeled with the Unity version they shipped in.
Unity stores the application version inside
ProjectSettings/ProjectSettings.asset, but GitHub has no native awareness of it.
As a result:
- Pull requests cannot easily be associated with shipped versions
- QA and release managers lack version visibility
- Release auditing becomes manual and error-prone
This action bridges that gap without enforcing or mutating versioning.
This action is intentionally label-based (not tag-based), making it compatible with:
- Short-lived feature branches
- Continuous integration
- Release candidate branches (
release/vX.Y.Z) - Multi-PR releases
It provides observability only, not control.
When a pull request changes the Unity bundleVersion, the action can automatically
create a corresponding version label (for example v1.7.1).
This is useful for:
- Release preparation
- QA awareness
- Reviewing intentional version bumps
When a pull request is closed and merged, the action can automatically apply the current Unity version label to that PR — even if the version was not changed in that PR.
This is useful for:
- Auditing which PRs shipped in a release
- Filtering PRs by released version
- Trunk-based workflows with many PRs per release
Runs when a pull request is opened or updated and creates a version label only if the bundleVersion changed.
name: PR – Detect Unity Version Change
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
detect-version:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: write
steps:
- uses: actions/checkout@v4
- uses: KostasBan/unity-bundle-version-labeler@v1
env:
GH_TOKEN: ${{ github.token }}
with:
mode: detect-changeRuns when a pull request is closed and merged and assigns the current Unity version label to that PR.
name: PR – Apply Unity Version Label on Merge
on:
pull_request:
types: [closed]
jobs:
apply-version:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v4
- uses: KostasBan/unity-bundle-version-labeler@v1
env:
GH_TOKEN: ${{ github.token }}
with:
mode: apply-on-mergeIf your Unity project is not at the repository root, you can specify a custom path.
- uses: KostasBan/unity-bundle-version-labeler@v1
with:
mode: detect-change
project-settings-path: Apps/MyUnityGame/ProjectSettings/ProjectSettings.asset