Skip to content

Commit e66ce4c

Browse files
webbertakkenAndrewKahrGabLeRoux
authored
feat: introduce v3 (#407)
* chore: upgrade docusaurus / fix deprecations * chore: upgrade docusaurus / fix deprecations * feat: introduce v3 * chore: upgrade node in ci * Reconcile v2 and v3 docs with latest unity builder changes. Remove parameters not available in v2 from v2 docs. * Remove parameters and outputs from v2.2.0-pre * Update version tags to align with new version * chore: upgrade docusaurus tsconfig * chore: import/order * fix: unresolved import * chore: versions as client-side block * fix: firebase resolution --------- Co-authored-by: Andrew Kahr <[email protected]> Co-authored-by: Gabriel Le Breton <[email protected]>
1 parent 324e8e3 commit e66ce4c

93 files changed

Lines changed: 11541 additions & 4942 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/checks.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v3
1313
- uses: actions/setup-node@v3
1414
with:
15-
node-version: '16'
15+
node-version: 18
1616
- uses: c-hive/gha-yarn-cache@v2
1717
- run: yarn
1818
- run: yarn verify:formatting
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v3
2424
- uses: actions/setup-node@v3
2525
with:
26-
node-version: '16'
26+
node-version: 18
2727
- uses: c-hive/gha-yarn-cache@v2
2828
- run: yarn
2929
- run: yarn verify:code-styles
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/checkout@v3
3535
- uses: actions/setup-node@v3
3636
with:
37-
node-version: '16'
37+
node-version: 18
3838
- uses: c-hive/gha-yarn-cache@v2
3939
- run: yarn
4040
- run: yarn typecheck
@@ -45,7 +45,7 @@ jobs:
4545
- uses: actions/checkout@v3
4646
- uses: actions/setup-node@v3
4747
with:
48-
node-version: '16'
48+
node-version: 18
4949
- uses: c-hive/gha-yarn-cache@v2
5050
- run: yarn
5151
- run: yarn test --coverage

.github/workflows/search-trigger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
name: Update search index
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- uses: darrenjennings/algolia-docsearch-action@da2ed379c147b356d60dbfec68bdcfacb2791a98
1111
with:
1212
algolia_application_id: 'E57FOT37U9'

.idea/prettier.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project version="4">
33
<component name="PrettierConfiguration">
4+
<option name="myConfigurationMode" value="AUTOMATIC" />
45
<option name="myRunOnSave" value="true" />
56
<option name="myRunOnReformat" value="true" />
67
</component>

docs/03-github/01-getting-started.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898

9999
# Build
100100
- name: Build project
101-
uses: game-ci/unity-builder@v2
101+
uses: game-ci/unity-builder@v3
102102
env:
103103
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
104104
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
@@ -168,7 +168,7 @@ jobs:
168168

169169
# Build
170170
- name: Build project
171-
uses: game-ci/unity-builder@v2
171+
uses: game-ci/unity-builder@v3
172172
env:
173173
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
174174
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
@@ -248,7 +248,7 @@ jobs:
248248
path: ${{ steps.testRunner.outputs.artifactsPath }}
249249
- if: matrix.targetPlatform == 'Android'
250250
uses: jlumbroso/[email protected]
251-
- uses: game-ci/unity-builder@v2
251+
- uses: game-ci/unity-builder@v3
252252
env:
253253
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
254254
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
@@ -295,7 +295,7 @@ jobs:
295295
Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-
296296
Library-${{ matrix.projectPath }}-
297297
Library-
298-
- uses: game-ci/unity-builder@v2
298+
- uses: game-ci/unity-builder@v3
299299
env:
300300
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
301301
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
@@ -341,7 +341,7 @@ jobs:
341341
Library-${{ matrix.projectPath }}-
342342
Library-
343343
344-
- uses: game-ci/unity-builder@v2
344+
- uses: game-ci/unity-builder@v3
345345
env:
346346
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
347347
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}

docs/03-github/02-activation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ floating license will be acquired before the build, and returned after.
105105
Example of use:
106106

107107
```yaml
108-
- uses: game-ci/unity-builder@v2
108+
- uses: game-ci/unity-builder@v3
109109
with:
110110
targetPlatform: WebGL
111111
unityLicensingServer: [url to your license server]

docs/03-github/04-builder.mdx

Lines changed: 31 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ secret.
4040
Then, define the build step as follows:
4141

4242
```yaml
43-
- uses: game-ci/unity-builder@v2
43+
- uses: game-ci/unity-builder@v3
4444
env:
4545
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
4646
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
@@ -60,7 +60,7 @@ Make sure you have set up these variables in the activation step:
6060
Then, define the build step as follows:
6161

6262
```yaml
63-
- uses: game-ci/unity-builder@v2
63+
- uses: game-ci/unity-builder@v3
6464
env:
6565
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
6666
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
@@ -77,7 +77,7 @@ If you host your own Unity license server internally you can provide its url usi
7777
Example of use:
7878

7979
```yaml
80-
- uses: game-ci/unity-builder@v2
80+
- uses: game-ci/unity-builder@v3
8181
with:
8282
targetPlatform: WebGL
8383
unityLicensingServer: [url to your license server]
@@ -152,7 +152,7 @@ _**required:** `false`_ _**default:** `auto`_
152152
Specific docker image that should be used for building the project.
153153

154154
```yaml
155-
- uses: game-ci/unity-builder@v2
155+
- uses: game-ci/unity-builder@v3
156156
with:
157157
customImage: 'unityci/editor:2020.1.14f1-base-0'
158158
```
@@ -192,7 +192,7 @@ There are two conditions for a custom buildMethod:
192192
Example:
193193

194194
```yaml
195-
- uses: game-ci/unity-builder@v2
195+
- uses: game-ci/unity-builder@v3
196196
with:
197197
buildMethod: EditorNamespace.BuilderClassName.StaticBuildMethod
198198
```
@@ -202,7 +202,7 @@ To get started with a modified version of the default Unity Builder build script
202202
`Assets/Editor/UnityBuilderAction` directory and reference it:
203203

204204
```yaml
205-
- uses: game-ci/unity-builder@v2
205+
- uses: game-ci/unity-builder@v3
206206
with:
207207
buildMethod: UnityBuilderAction.BuildScript.Build
208208
```
@@ -220,7 +220,7 @@ Parameters must start with a hyphen (`-`) and may be followed by a value (withou
220220
Parameters without a value will be considered booleans (with a value of true).
221221

222222
```yaml
223-
- uses: game-ci/unity-builder@v2
223+
- uses: game-ci/unity-builder@v3
224224
with:
225225
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
226226
```
@@ -238,7 +238,7 @@ _**required:** `false`_ _**default:** `""`_
238238
Configure a specific versioning strategy
239239

240240
```yaml
241-
- uses: game-ci/unity-builder@v2
241+
- uses: game-ci/unity-builder@v3
242242
with:
243243
versioning: Semantic
244244
```
@@ -298,7 +298,7 @@ Set this flag to `androidPackage` to build an apk, `androidAppBundle` for an aab
298298
`androidStudioProject` to build an Android Studio Project.
299299

300300
```yaml
301-
- uses: game-ci/unity-builder@v2
301+
- uses: game-ci/unity-builder@v3
302302
with:
303303
androidExportType: 'androidAppBundle'
304304
androidKeystoreName: user.keystore
@@ -308,33 +308,12 @@ Set this flag to `androidPackage` to build an apk, `androidAppBundle` for an aab
308308
androidKeyaliasPass: ${{ secrets.ANDROID_KEYALIAS_PASS }}
309309
```
310310

311-
You should also set all the Android Keystore options (see below). Refer to (this
312-
section)[/docs/github/deployment/android#3-generate-an-upload-key-and-keystore] for keystore setup.
311+
You should also set all the Android Keystore options (see below). Refer to
312+
[this section](/docs/github/deployment/android#3-generate-an-upload-key-and-keystore) for keystore
313+
setup.
313314

314315
_**required:** `false`_ _**default:** `androidPackage`_
315316

316-
#### androidAppBundle
317-
318-
**[Deprecated] Please use androidExportType instead.**
319-
320-
Set this flag to `true` to build '.aab' instead of '.apk'.
321-
322-
```yaml
323-
- uses: game-ci/unity-builder@v2
324-
with:
325-
androidAppBundle: true
326-
androidKeystoreName: user.keystore
327-
androidKeystoreBase64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
328-
androidKeystorePass: ${{ secrets.ANDROID_KEYSTORE_PASS }}
329-
androidKeyaliasName: ${{ secrets.ANDROID_KEYALIAS_NAME }}
330-
androidKeyaliasPass: ${{ secrets.ANDROID_KEYALIAS_PASS }}
331-
```
332-
333-
You should also set all the Android Keystore options (see below). Refer to (this
334-
section)[/docs/github/deployment/android#3-generate-an-upload-key-and-keystore] for keystore setup.
335-
336-
_**required:** `false`_ _**default:** `false`_
337-
338317
#### androidKeystoreName
339318

340319
Configure the android `keystoreName`. Must be provided if configuring the below keystore options.
@@ -417,7 +396,7 @@ _**required:** `false`_ _**default:** `""`_
417396
Allows the branch of the build to be dirty, and still generate the build.
418397

419398
```yaml
420-
- uses: game-ci/unity-builder@v2
399+
- uses: game-ci/unity-builder@v3
421400
with:
422401
allowDirtyBuild: true
423402
```
@@ -447,6 +426,20 @@ ie `3.4.0`. An empty string represents the latest available version on homebrew.
447426

448427
_**required:** `false`_ _**default:** `""`_
449428

429+
#### dockerWorkspacePath
430+
431+
Allows customizing the build path within the container in case there are hardcoded paths generated
432+
during the build. For example building an IOS XCode project on Linux and moving to a new path on
433+
MacOS occasionally leads to broken paths requiring this override to ensure the paths match.
434+
435+
Paths should be of format `/path/to/build`, ie `/tmp/build`. On Windows, leave off the drive letter
436+
specification. For example `C:\build` becomes `/build`. There should be no trailing slash in the
437+
path and the path should be absolute. The path will automatically be created within the container if
438+
it does not exist. It is recommended to use a path that doesn't already exist within the container
439+
to avoid any conflicts.
440+
441+
_**required:** `false`_ _**default:** `"/github/workspace"`_
442+
450443
## Outputs
451444

452445
Below are outputs that can be accessed by using `${{ steps.myBuildStep.outputs.outputName }}`, where
@@ -458,7 +451,7 @@ Returns the version that was generated by Builder, following the strategy config
458451
`versioning`.
459452

460453
```yaml
461-
- uses: game-ci/unity-builder@v2
454+
- uses: game-ci/unity-builder@v3
462455
id: myBuildStep
463456
- run: echo 'Project Version: ${{ steps.myBuildStep.outputs.buildVersion }}'
464457
```
@@ -468,7 +461,7 @@ Returns the version that was generated by Builder, following the strategy config
468461
Returns the version code that was generated by Builder for Android builds.
469462

470463
```yaml
471-
- uses: game-ci/unity-builder@v2
464+
- uses: game-ci/unity-builder@v3
472465
id: myBuildStep
473466
- run: echo 'Android Version Code: ${{ steps.myBuildStep.outputs.androidVersionCode }}'
474467
```
@@ -507,7 +500,7 @@ steps:
507500
- uses: webfactory/[email protected]
508501
with:
509502
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
510-
- uses: game-ci/unity-builder@v2
503+
- uses: game-ci/unity-builder@v3
511504
with:
512505
sshAgent: ${{ env.SSH_AUTH_SOCK }}
513506
```
@@ -565,7 +558,7 @@ jobs:
565558
restore-keys: Library-
566559
- if: matrix.targetPlatform == 'Android'
567560
uses: jlumbroso/[email protected]
568-
- uses: game-ci/unity-builder@v2
561+
- uses: game-ci/unity-builder@v3
569562
env:
570563
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
571564
with:

docs/03-github/06-deployment/android.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jobs:
172172
with:
173173
path: Library
174174
key: Library-Android
175-
- uses: game-ci/unity-builder@v2
175+
- uses: game-ci/unity-builder@v3
176176
with:
177177
targetPlatform: Android
178178
androidAppBundle: true

docs/03-github/06-deployment/ios.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ jobs:
436436
path: Library
437437
key: Library-iOS
438438
439-
- uses: game-ci/unity-builder@v2
439+
- uses: game-ci/unity-builder@v3
440440
with:
441441
targetPlatform: iOS
442442

docs/03-github/06-deployment/steam.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
restore-keys: |
4141
Library-${{ matrix.targetPlatform }}-
4242
Library-
43-
- uses: game-ci/unity-builder@v2
43+
- uses: game-ci/unity-builder@v3
4444
id: build
4545
env:
4646
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

docs/09-troubleshooting/common-issues.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ here][unity-docker-versions].
9292

9393
In this particular case, it is also important to look for the last part of the docker image which is
9494
the version for GameCI. `-0` means it is the latest `v0.x.x` version of the docker images. `v0.x.x`
95-
version is out of date as we moved to Version 1 as shown on
95+
and `v1.x.x` are out of date as we moved to Version 2 as shown on
9696
[github.com/game-ci/docker/releases](https://github.com/game-ci/docker/releases). We are not
97-
publishing images for `v0.x.x` anymore.
97+
publishing images for `v0.x.x` or `v1.x.x` anymore.
9898

99-
The correct image should be `unityci/editor:2021.3.0f1-android-1`.
99+
The correct image should be `unityci/editor:2021.3.0f1-android-2`.
100100

101101
You can also test this locally:
102102

@@ -106,24 +106,24 @@ docker pull unityci/editor:2021.3.0f1-android-0
106106
# Error response from daemon: manifest for unityci/editor:2021.3.0f1-android-0 not found: manifest unknown: manifest unknown
107107

108108
# right
109-
docker pull unityci/editor:2021.3.0f1-android-1
110-
# 2021.3.0f1-android-1: Pulling from unityci/editor
109+
docker pull unityci/editor:2021.3.0f1-android-2
110+
# 2021.3.0f1-android-2: Pulling from unityci/editor
111111
# [...]
112112
```
113113

114114
#### Github Actions
115115

116-
You need to make sure you are using Github Actions v2, check for the version of your actions in your
116+
You need to make sure you are using Github Actions v3, check for the version of your actions in your
117117
`.github/workflows/*.yml` files.
118118

119119
```diff
120-
- uses: game-ci/unity-builder@v1
121-
+ uses: game-ci/unity-builder@v2
120+
- uses: game-ci/unity-builder@v2
121+
+ uses: game-ci/unity-builder@v3
122122
```
123123

124124
#### Gitlab CI
125125

126-
Set the `IMAGE_VERSION` to 1 in
126+
Set the `IMAGE_VERSION` to 2 in
127127
[`.gitlab-ci.yml`](https://gitlab.com/game-ci/unity3d-gitlab-ci-example/-/blob/main/.gitlab-ci.yml#L12)
128128

129129
### Scripts have compiler errors.

0 commit comments

Comments
 (0)