Skip to content

Commit feeb96a

Browse files
unity-setup@v2.1.1 (#41)
- disable `hub-auto-update` if `hub-version` is specified
1 parent 0c0d266 commit feeb96a

File tree

8 files changed

+12
-11
lines changed

8 files changed

+12
-11
lines changed

.github/workflows/validate.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
with:
2828
build-options: ./.github/workflows/build-options.json
2929
group-by: unity-version
30+
job-name-prefix: Install
3031
outputs:
3132
jobs: ${{ steps.setup-jobs.outputs.jobs }}
3233
validate:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ steps:
5757
| `architecture` | Specify the architecture to install. Either `x86_64` or `arm64`. | false |
5858
| `install-path` | Specify the path where Unity will be installed to. | false |
5959
| `auto-update-hub` | Automatically update Unity Hub to the latest version before installing Unity Editors. Can be `true` or `false`. Default is `true`. | false |
60-
| `hub-version` | Specify a specific version of Unity Hub to install. Example: `3.12.0`. Cannot be used with `auto-update-hub`. | false |
60+
| `hub-version` | Specify a specific version of Unity Hub to install. Example: `3.12.0`. When set, `auto-update-hub` is automatically disabled. | false |
6161

6262
#### unity-version formats
6363

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ inputs:
3232
required: false
3333
default: 'true'
3434
hub-version:
35-
description: 'Specify a specific version of Unity Hub to install. Example: `3.12.0`. Cannot be used with `auto-update-hub` set to `true`.'
35+
description: 'Specify a specific version of Unity Hub to install. Example: `3.12.0`. When set, auto-update-hub is automatically disabled.'
3636
required: false
3737
default: ''
3838
runs:

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63593,10 +63593,10 @@ async function main() {
6359363593
core.info(`UNITY_PROJECT_PATH:\n > ${unityProjectPath}`);
6359463594
core.exportVariable('UNITY_PROJECT_PATH', unityProjectPath);
6359563595
}
63596-
const autoUpdate = core.getInput('auto-update-hub');
63596+
let autoUpdate = core.getInput('auto-update-hub');
6359763597
const hubVersion = core.getInput('hub-version');
6359863598
if (autoUpdate === 'true' && hubVersion && hubVersion.length > 0) {
63599-
throw new Error('Cannot specify a specific Unity Hub version when auto-update is set to true.');
63599+
autoUpdate = 'false';
6360063600
}
6360163601
const unityHub = new unity_cli_1.UnityHub();
6360263602
const unityHubPath = await unityHub.Install(autoUpdate === 'true', hubVersion);

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unity-setup",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "A GitHub action for setting up the Unity Game Engine for CI/CD workflows.",
55
"author": "Buildalon",
66
"license": "MIT",
@@ -44,4 +44,4 @@
4444
"watch": "ncc build src/index.ts -o dist --source-map --license licenses.txt --watch",
4545
"clean": "npm install && shx rm -rf dist/ out/ node_modules/ && npm ci"
4646
}
47-
}
47+
}

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ async function main() {
1414
core.exportVariable('UNITY_PROJECT_PATH', unityProjectPath);
1515
}
1616

17-
const autoUpdate = core.getInput('auto-update-hub');
17+
let autoUpdate = core.getInput('auto-update-hub');
1818
const hubVersion = core.getInput('hub-version');
1919

2020
if (autoUpdate === 'true' && hubVersion && hubVersion.length > 0) {
21-
throw new Error('Cannot specify a specific Unity Hub version when auto-update is set to true.');
21+
autoUpdate = 'false';
2222
}
2323

2424
const unityHub = new UnityHub();

0 commit comments

Comments
 (0)