@@ -9,27 +9,29 @@ A GitHub Action for setting up the [Unity Game Engine](https://unity.com) on Git
99``` yaml
1010strategy :
1111 matrix :
12- os : [ubuntu-latest, windows-latest, macos-latest]
13- unity-version :
14- - ' in version file'
15- - 2019.4.40f1
16- - 2020.x
17- - 2021.3.x
18- - 2022.3
19- - 6000
20- include :
21- - os : ubuntu-latest
22- build-targets : StandaloneLinux64, Android, iOS
23- modules : linux-server
24- - os : windows-latest
25- build-targets : StandaloneWindows64, Android, WSAPlayer
26- modules : windows-server
27- - os : macos-13
28- build-targets : StandaloneOSX, Android, iOS
29- modules : mac-server
30- - os : macos-latest
31- build-targets : StandaloneOSX, Android, iOS, VisionOS
32- modules : mac-server
12+ os : [ubuntu-latest, windows-latest, macos-latest]
13+ unity-version :
14+ - None
15+ - 2019.4.40f1 (ffc62b691db5)
16+ - 2020.x
17+ - 2021.3.x
18+ - 2022.3
19+ - 6000.0.x
20+ - 6000.1.*
21+ - 6000
22+ include :
23+ - os : ubuntu-latest
24+ build-targets : StandaloneLinux64, Android, iOS
25+ modules : linux-server
26+ - os : windows-latest
27+ build-targets : StandaloneWindows64, Android, WSAPlayer
28+ modules : windows-server
29+ - os : macos-13
30+ build-targets : StandaloneOSX, Android, iOS
31+ modules : mac-server
32+ - os : macos-latest
33+ build-targets : StandaloneOSX, Android, iOS, VisionOS
34+ modules : mac-server
3335steps :
3436 - uses : RageAgainstThePixel/unity-setup@v2
3537 with :
@@ -57,6 +59,23 @@ steps:
5759| `install-path` | Specify the path where Unity will be installed to. | false |
5860| `auto-update-hub` | Automatically update Unity Hub to the latest version before installing Unity Editors. Can be `true` or `false`. Default is `true`. | false |
5961
62+ # ### unity-version formats
63+
64+ Use any of the following patterns to control how the editor version is resolved :
65+
66+ - Fully qualified : ` 2022.3.62f1` or `2019.4.40f1 (ffc62b691db5)`
67+ - Major + minor : ` 6000.2` → latest stable in the 6000.2.x line
68+ - Major only : ` 6000` or `2022` → latest stable in that major (e.g., `6000.2.1f1`, `2022.3.x`)
69+ - Wildcards : ` 2021.3.x` , `2022.3.*`, `6000.0.x`
70+ - Exact year+minor with trailing zero : ` 6000.0.0` confines selection to the 6000.0.x line
71+
72+ > [!NOTE]
73+ >
74+ > - If you want the latest across minors within a major, use just the major (e.g., `6000`).
75+ > - If you want to stay within a specific minor, use `MAJOR.MINOR` (e.g., `6000.2`).
76+ > - If you want to lock to the `.0` minor, use `6000.0.0` or `6000.0.x`.
77+ > - Stable (f) releases are preferred unless you explicitly specify a pre-release (a/b/rc) version.
78+
6079# ## outputs
6180
6281- `UNITY_HUB_PATH` : The path to the installed unity hub.
0 commit comments