File tree Expand file tree Collapse file tree 1 file changed +23
-21
lines changed Expand file tree Collapse file tree 1 file changed +23
-21
lines changed Original file line number Diff line number Diff line change 5
5
tags :
6
6
- " *"
7
7
8
- env :
9
- UNITY_LICENSE : ${{ secrets.UNITY_LICENSE }}
10
-
11
8
jobs :
12
9
build :
13
- name : Build my project
10
+ name : Build for ${{ matrix.targetPlatform }}
14
11
runs-on : ubuntu-latest
12
+ strategy :
13
+ fail-fast : false
14
+ matrix :
15
+ targetPlatform :
16
+ - StandaloneOSX
17
+ - StandaloneWindows
18
+ - StandaloneWindows64
19
+ - StandaloneLinux64
20
+ - WebGL
15
21
steps :
16
22
# Checkout
17
23
- name : Checkout repository
18
24
uses : actions/checkout@v2
19
25
with :
26
+ fetch-depth : 0
20
27
lfs : true
21
28
22
29
# Cache
23
30
- uses : actions/cache@v2
24
31
with :
25
32
path : Library
26
- key : Library
27
-
28
- # Test
29
- - name : Run tests
30
- uses : game-ci/unity-test-runner@v2
31
- with :
32
- unityVersion : 2020.3.23f1
33
+ key : Library-${{ matrix.targetPlatform }}
34
+ restore-keys : Library-
33
35
34
36
# Build
35
- - name : Build project
36
- uses : game-ci/unity-builder@v2
37
+ - uses : game-ci/unity-builder@v2
38
+ env :
39
+ UNITY_LICENSE : ${{ secrets.UNITY_LICENSE }}
37
40
with :
38
- unityVersion : 2020.3.23f1
39
- targetPlatform : StandaloneWindows64
41
+ targetPlatform : ${{ matrix.targetPlatform }}
40
42
41
43
# Output
42
44
- uses : actions/upload-artifact@v2
43
45
with :
44
- name : Build
45
- path : build
46
+ name : Build-${{ matrix.targetPlatform }}
47
+ path : build/${{ matrix.targetPlatform }}
46
48
47
49
- name : Zip build
48
50
run : |
49
- pushd build/StandaloneWindows64
50
- zip -r ../../StandaloneWindows64 .zip .
51
+ pushd build/${{ matrix.targetPlatform }}
52
+ zip -r ../../${{ matrix.targetPlatform }} .zip .
51
53
popd
52
54
53
55
- name : Release
54
56
uses : softprops/action-gh-release@v1
55
57
with :
56
- files : StandaloneWindows64 .zip
57
- name : Release ${{ github.ref }}
58
+ files : ${{ matrix.targetPlatform }} .zip
59
+ name : Release ${{ github.ref }}
You can’t perform that action at this time.
0 commit comments