-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (55 loc) · 1.97 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build
on:
push:
branches:
- release
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- release
jobs:
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows64 # Build a Windows 64-bit standalone.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: false
- uses: actions/cache@v4
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-
- if: matrix.targetPlatform == 'Android'
uses: jlumbroso/[email protected]
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
buildName: micromissiles-${{ github.ref_name }}-${{ matrix.targetPlatform }}
versioning: Semantic
targetPlatform: ${{ matrix.targetPlatform }}
- if: matrix.targetPlatform == 'StandaloneWindows64'
run: cd build/${{ matrix.targetPlatform }} && sudo zip -r ../build-${{ matrix.targetPlatform }}.zip * && cd -
- if: matrix.targetPlatform == 'StandaloneWindows64'
uses: actions/upload-artifact@v4
with:
name: Build-${{ matrix.targetPlatform }}
path: build/build-${{ matrix.targetPlatform }}.zip
- if: matrix.targetPlatform == 'StandaloneOSX'
run: sudo tar -czvf build/build-${{ matrix.targetPlatform }}.tar.gz -C build/${{ matrix.targetPlatform }} .
- if: matrix.targetPlatform == 'StandaloneOSX'
uses: actions/upload-artifact@v4
with:
name: Build-${{ matrix.targetPlatform }}
path: build/build-${{ matrix.targetPlatform }}.tar.gz