File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 94
94
name : Build-Windows
95
95
path : build/StandaloneWindows64
96
96
97
+ build_webgl :
98
+ name : Build WebGL
99
+ runs-on : ubuntu-latest
100
+ steps :
101
+ # 1. Checkout
102
+ - name : Checkout repository
103
+ uses : actions/checkout@v4
104
+ with :
105
+ lfs : true
106
+ fetch-depth : 0
107
+
108
+ # 2. Cache:缓存 team_project/Library
109
+ - uses : actions/cache@v3
110
+ id : cache-library-build
111
+ with :
112
+ path : team_project/Library
113
+ key : Library-build-${{ hashFiles('team_project/Assets/**', 'team_project/Packages/**', 'team_project/ProjectSettings/**') }}
114
+ restore-keys : |
115
+ Library-build-
116
+
117
+ # 3. Build project(WebGL 平台)
118
+ - name : Build project
119
+ uses : game-ci/unity-builder@v4
120
+ env :
121
+ UNITY_LICENSE : ${{ secrets.UNITY_LICENSE }}
122
+ UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
123
+ UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
124
+ with :
125
+ projectPath : team_project
126
+ targetPlatform : WebGL
127
+
128
+ # 4. Upload artifact:指向 WebGL 的构建输出目录
129
+ - name : Upload Build-WebGL
130
+ uses : actions/upload-artifact@v4
131
+ with :
132
+ name : Build-WebGL
133
+ path : build/WebGL
134
+
97
135
docs :
98
136
name : Generate and Deploy Documentation
99
137
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments