Skip to content

Commit 2800d14

Browse files
authored
Fix Windows Arguments Passed to Unity (#623)
* Add missing parameter, add quotes around variables, bump action versions * Wrap quotes * Fix upload artifact naming conflict
1 parent 5ba8197 commit 2800d14

File tree

4 files changed

+30
-22
lines changed

4 files changed

+30
-22
lines changed

.github/workflows/build-tests-mac.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
###########################
3838
# Cache #
3939
###########################
40-
- uses: actions/cache@v3
40+
- uses: actions/cache@v4
4141
with:
4242
path: ${{ matrix.projectPath }}/Library
4343
key: Library-${{ matrix.projectPath }}-macos-${{ matrix.targetPlatform }}
@@ -61,6 +61,7 @@ jobs:
6161
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
6262
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
6363
with:
64+
buildName: 'GameCI Test Build'
6465
projectPath: ${{ matrix.projectPath }}
6566
unityVersion: ${{ matrix.unityVersion }}
6667
targetPlatform: ${{ matrix.targetPlatform }}
@@ -71,8 +72,8 @@ jobs:
7172
###########################
7273
# Upload #
7374
###########################
74-
- uses: actions/upload-artifact@v3
75+
- uses: actions/upload-artifact@v4
7576
with:
76-
name: Build MacOS (${{ matrix.unityVersion }})
77+
name: Build ${{ matrix.targetPlatform }} on MacOS (${{ matrix.unityVersion }})
7778
path: build
7879
retention-days: 14

.github/workflows/build-tests-ubuntu.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
###########################
7070
# Cache #
7171
###########################
72-
- uses: actions/cache@v3
72+
- uses: actions/cache@v4
7373
with:
7474
path: ${{ matrix.projectPath }}/Library
7575
key: Library-${{ matrix.projectPath }}-ubuntu-${{ matrix.targetPlatform }}
@@ -88,6 +88,7 @@ jobs:
8888
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
8989
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
9090
with:
91+
buildName: 'GameCI Test Build'
9192
projectPath: ${{ matrix.projectPath }}
9293
unityVersion: ${{ matrix.unityVersion }}
9394
targetPlatform: ${{ matrix.targetPlatform }}
@@ -108,6 +109,7 @@ jobs:
108109
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
109110
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
110111
with:
112+
buildName: 'GameCI Test Build'
111113
projectPath: ${{ matrix.projectPath }}
112114
unityVersion: ${{ matrix.unityVersion }}
113115
targetPlatform: ${{ matrix.targetPlatform }}
@@ -128,6 +130,7 @@ jobs:
128130
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
129131
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
130132
with:
133+
buildName: 'GameCI Test Build'
131134
projectPath: ${{ matrix.projectPath }}
132135
unityVersion: ${{ matrix.unityVersion }}
133136
targetPlatform: ${{ matrix.targetPlatform }}
@@ -138,8 +141,8 @@ jobs:
138141
###########################
139142
# Upload #
140143
###########################
141-
- uses: actions/upload-artifact@v3
144+
- uses: actions/upload-artifact@v4
142145
with:
143-
name: Build Ubuntu (${{ matrix.unityVersion }})
146+
name: Build ${{ matrix.targetPlatform }} on Ubuntu (${{ matrix.unityVersion }})
144147
path: build
145148
retention-days: 14

.github/workflows/build-tests-windows.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
###########################
4040
# Cache #
4141
###########################
42-
- uses: actions/cache@v3
42+
- uses: actions/cache@v4
4343
with:
4444
path: ${{ matrix.projectPath }}/Library
4545
key: Library-${{ matrix.projectPath }}-windows-${{ matrix.targetPlatform }}
@@ -67,6 +67,7 @@ jobs:
6767
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
6868
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
6969
with:
70+
buildName: 'GameCI Test Build'
7071
projectPath: ${{ matrix.projectPath }}
7172
unityVersion: ${{ matrix.unityVersion }}
7273
targetPlatform: ${{ matrix.targetPlatform }}
@@ -90,6 +91,7 @@ jobs:
9091
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
9192
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
9293
with:
94+
buildName: 'GameCI Test Build'
9395
projectPath: ${{ matrix.projectPath }}
9496
unityVersion: ${{ matrix.unityVersion }}
9597
targetPlatform: ${{ matrix.targetPlatform }}
@@ -112,6 +114,7 @@ jobs:
112114
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
113115
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
114116
with:
117+
buildName: 'GameCI Test Build'
115118
projectPath: ${{ matrix.projectPath }}
116119
unityVersion: ${{ matrix.unityVersion }}
117120
targetPlatform: ${{ matrix.targetPlatform }}
@@ -122,8 +125,8 @@ jobs:
122125
###########################
123126
# Upload #
124127
###########################
125-
- uses: actions/upload-artifact@v3
128+
- uses: actions/upload-artifact@v4
126129
with:
127-
name: Build Windows (${{ matrix.unityVersion }})
130+
name: Build ${{ matrix.targetPlatform }} on Windows (${{ matrix.unityVersion }})
128131
path: build
129132
retention-days: 14

dist/platforms/windows/build.ps1

+14-13
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,20 @@ $unityArgs = @(
137137
"-batchmode",
138138
"-nographics",
139139
"-silent-crashes",
140-
"-projectPath", $Env:UNITY_PROJECT_PATH,
141-
"-executeMethod", $Env:BUILD_METHOD,
142-
"-buildTarget", $Env:BUILD_TARGET,
143-
"-customBuildTarget", $Env:BUILD_TARGET,
144-
"-customBuildPath", $Env:CUSTOM_BUILD_PATH,
145-
"-buildVersion", $Env:VERSION,
146-
"-androidVersionCode", $Env:ANDROID_VERSION_CODE,
147-
"-androidKeystorePass", $Env:ANDROID_KEYSTORE_PASS,
148-
"-androidKeyaliasName", $Env:ANDROID_KEYALIAS_NAME,
149-
"-androidKeyaliasPass", $Env:ANDROID_KEYALIAS_PASS,
150-
"-androidTargetSdkVersion", $Env:ANDROID_TARGET_SDK_VERSION,
151-
"-androidExportType", $Env:ANDROID_EXPORT_TYPE,
152-
"-androidSymbolType", $Env:ANDROID_SYMBOL_TYPE,
140+
"-customBuildName", "`"$Env:BUILD_NAME`"",
141+
"-projectPath", "`"$Env:UNITY_PROJECT_PATH`"",
142+
"-executeMethod", "`"$Env:BUILD_METHOD`"",
143+
"-buildTarget", "`"$Env:BUILD_TARGET`"",
144+
"-customBuildTarget", "`"$Env:BUILD_TARGET`"",
145+
"-customBuildPath", "`"$Env:CUSTOM_BUILD_PATH`"",
146+
"-buildVersion", "`"$Env:VERSION`"",
147+
"-androidVersionCode", "`"$Env:ANDROID_VERSION_CODE`"",
148+
"-androidKeystorePass", "`"$Env:ANDROID_KEYSTORE_PASS`"",
149+
"-androidKeyaliasName", "`"$Env:ANDROID_KEYALIAS_NAME`"",
150+
"-androidKeyaliasPass", "`"$Env:ANDROID_KEYALIAS_PASS`"",
151+
"-androidTargetSdkVersion", "`"$Env:ANDROID_TARGET_SDK_VERSION`"",
152+
"-androidExportType", "`"$Env:ANDROID_EXPORT_TYPE`"",
153+
"-androidSymbolType", "`"$Env:ANDROID_SYMBOL_TYPE`"",
153154
"-logfile", "-"
154155
) + $customParametersArray
155156

0 commit comments

Comments
 (0)