Skip to content

Commit 58ade2d

Browse files
committed
add: unity-build.yml
1 parent e70fc10 commit 58ade2d

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/unity-build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Unity Build on #build commit
2+
3+
on:
4+
push:
5+
branches:
6+
- '**' # следим за всеми ветками
7+
8+
jobs:
9+
build:
10+
if: contains(github.event.head_commit.message, '#build')
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Cache Library
16+
uses: actions/cache@v3
17+
with:
18+
path: Library
19+
key: Library-${{ runner.os }}-${{ hashFiles('**/ProjectSettings/ProjectVersion.txt') }}
20+
restore-keys: |
21+
Library-${{ runner.os }}-
22+
23+
- name: Setup Unity
24+
uses: game-ci/unity-setup@v2
25+
with:
26+
unityVersion: 2022.3.21f1
27+
activation: manual
28+
username: ${{ secrets.UNITY_USERNAME }}
29+
password: ${{ secrets.UNITY_PASSWORD }}
30+
license: ${{ secrets.UNITY_LICENSE }}
31+
32+
- name: Build Android
33+
uses: game-ci/unity-builder@v2
34+
with:
35+
targetPlatform: Android
36+
buildPath: Artifacts/Android
37+
38+
- name: Upload Build Artifact
39+
uses: actions/upload-artifact@v3
40+
with:
41+
name: AndroidBuild
42+
path: Artifacts

0 commit comments

Comments
 (0)