Skip to content

Commit ce42954

Browse files
- refactored to use new unity-cli - added additional `auto-update-hub` flag to enable/disable unity hub updates
1 parent 03b5562 commit ce42954

31 files changed

+53355
-38553
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
runs-on: ${{ matrix.os }}
1717
permissions:
1818
contents: read
19+
timeout-minutes: 30
1920
env:
2021
UNITY_EDITORS: '' # set by the unity-setup action
2122
UNITY_HUB_PATH: '' # set by the unity-setup action
@@ -30,6 +31,7 @@ jobs:
3031
unity-version: ${{ matrix.unity-version }}
3132
build-targets: ${{ matrix.build-targets }}
3233
modules: ${{ matrix.modules }}
34+
auto-update-hub: ${{ !contains(matrix.modules, 'None') }}
3335
- run: |
3436
echo 'UNITY_HUB_PATH: ${{ env.UNITY_HUB_PATH }}'
3537
echo 'UNITY_EDITORS: ${{ env.UNITY_EDITORS }}'

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ steps:
5555
| `modules` | Modules to install with the editor. This list can be different per editor version. | false |
5656
| `architecture` | Specify the architecture to install. Either `x86_64` or `arm64`. | false |
5757
| `install-path` | Specify the path where Unity will be installed to. | false |
58+
| `auto-update-hub` | Automatically update Unity Hub to the latest version before installing Unity Editors. Can be `true` or `false`. Default is `true`. | false |
5859

5960
### outputs
6061

action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'unity-setup'
1+
name: unity-setup
22
description: A GitHub action for setting up the Unity Game Engine for CI/CD workflows.
33
branding:
44
color: blue
@@ -27,6 +27,10 @@ inputs:
2727
install-path:
2828
description: 'Specify the path where Unity will be installed to.'
2929
required: false
30+
auto-update-hub:
31+
description: 'Automatically update Unity Hub to the latest version before installing Unity Editors. Can be `true` or `false`.'
32+
required: false
33+
default: 'true'
3034
runs:
31-
using: 'node20'
32-
main: 'dist/index.js'
35+
using: node20
36+
main: dist/index.js

0 commit comments

Comments
 (0)