-
Notifications
You must be signed in to change notification settings - Fork 0
115 lines (100 loc) · 2.78 KB
/
main.yml
File metadata and controls
115 lines (100 loc) · 2.78 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Test & Build
on:
pull_request:
push:
branches:
- main
permissions: write-all
jobs:
test:
name: Test the project
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
# Cache
- uses: actions/cache@v3
with:
path: GGK/Library
key: GGK/Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
GGK/Library-
# Test
- name: Run tests
uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: GGK
githubToken: ${{ secrets.GITHUB_TOKEN }}
build-windows:
name: Build the project for Windows
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
# Cache
- uses: actions/cache@v3
with:
path: GGK/Library
key: GGK/Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
GGK/Library-
# Build
- name: Build project for Windows
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
allowDirtyBuild: true
projectPath: GGK/
targetPlatform: StandaloneWindows
buildName: GGK
# Output
- uses: actions/upload-artifact@v4
with:
name: GGKWindows
path: build
build-mac:
name: Build the project for macOs
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
# Cache
- uses: actions/cache@v3
with:
path: GGK/Library
key: GGK/Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
GGK/Library-
# Build
- name: Build project for macOS
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
allowDirtyBuild: true
projectPath: GGK/
targetPlatform: StandaloneOSX
buildName: GGK
# Output
- uses: actions/upload-artifact@v4
with:
name: GGKmacOs
path: build