Skip to content

Commit 8584dae

Browse files
unity-setup@v2.1.1 (#60)
- disable `hub-auto-update` if `hub-version` is specified
1 parent f32b6e3 commit 8584dae

File tree

9 files changed

+238
-89
lines changed

9 files changed

+238
-89
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
@@ -58,7 +58,7 @@ steps:
5858
| `architecture` | Specify the architecture to install. Either `x86_64` or `arm64`. | false |
5959
| `install-path` | Specify the path where Unity will be installed to. | false |
6060
| `auto-update-hub` | Automatically update Unity Hub to the latest version before installing Unity Editors. Can be `true` or `false`. Default is `true`. | false |
61-
| `hub-version` | Specify a specific version of Unity Hub to install. Example: `3.12.0`. Cannot be used with `auto-update-hub`. | false |
61+
| `hub-version` | Specify a specific version of Unity Hub to install. Example: `3.12.0`. When set, auto-update-hub is automatically disabled. | false |
6262

6363
#### unity-version formats
6464

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: 164 additions & 56 deletions
Large diffs are not rendered by default.

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.

dist/licenses.txt

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -258,22 +258,62 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
258258

259259

260260
minimatch
261-
ISC
262-
The ISC License
261+
BlueOak-1.0.0
262+
# Blue Oak Model License
263263

264-
Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
264+
Version 1.0.0
265265

266-
Permission to use, copy, modify, and/or distribute this software for any
267-
purpose with or without fee is hereby granted, provided that the above
268-
copyright notice and this permission notice appear in all copies.
266+
## Purpose
269267

270-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
271-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
272-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
273-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
274-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
275-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
276-
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
268+
This license gives everyone as much permission to work with
269+
this software as possible, while protecting contributors
270+
from liability.
271+
272+
## Acceptance
273+
274+
In order to receive this license, you must agree to its
275+
rules. The rules of this license are both obligations
276+
under that agreement and conditions to your license.
277+
You must not do anything with this software that triggers
278+
a rule that you cannot or will not follow.
279+
280+
## Copyright
281+
282+
Each contributor licenses you to do everything with this
283+
software that would otherwise infringe that contributor's
284+
copyright in it.
285+
286+
## Notices
287+
288+
You must ensure that everyone who gets a copy of
289+
any part of this software from you, with or without
290+
changes, also gets the text of this license or a link to
291+
<https://blueoakcouncil.org/license/1.0.0>.
292+
293+
## Excuse
294+
295+
If anyone notifies you in writing that you have not
296+
complied with [Notices](#notices), you can keep your
297+
license by taking all practical steps to comply within 30
298+
days after the notice. If you do not do so, your license
299+
ends immediately.
300+
301+
## Patent
302+
303+
Each contributor licenses you to do everything with this
304+
software that would otherwise infringe any patent claims
305+
they can license or become able to license.
306+
307+
## Reliability
308+
309+
No contributor can revoke this license.
310+
311+
## No Liability
312+
313+
**_As far as the law allows, this software comes as is,
314+
without any warranty or condition, and no contributor
315+
will be liable to anyone for any damages related to this
316+
software or this license, under any kind of legal claim._**
277317

278318

279319
minipass

package-lock.json

Lines changed: 13 additions & 13 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": "RageAgainstThePixel",
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)