-
Notifications
You must be signed in to change notification settings - Fork 58
67 lines (62 loc) · 1.74 KB
/
build-apk.yml
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
name: Build PHANTO
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 5 * * *' # run at 5 AM UTC
jobs:
build:
name: Build PHANTO main branch
runs-on: ubuntu-latest
steps:
# Checkout (with LFS)
- name: Checkout repo
uses: actions/checkout@v3
with:
ref: main
sparse-checkout: |
Assets
Packages
Media
ProjectSettings
- name: Bump version code number
run:
echo "APK_VERSION_FROM_RUN=$(($GITHUB_RUN_NUMBER))" >> $GITHUB_ENV
- name: Cache Library
uses: actions/cache@v3
with:
key: PHANTO-${{ github.run_id }}
path: |
Library
restore-keys: |
PHANTO-
- name: Free Up GitHub Actions Ubuntu Runner Disk Space
uses: jlumbroso/[email protected]
with:
tool-cache: false
android: true
dotnet: false
haskell: true
large-packages: false
swap-storage: false
- name: Build apk
uses: game-ci/unity-builder@v2
env:
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
APK_VERSION_CODE: ${{ env.APK_VERSION_FROM_RUN }}
with:
allowDirtyBuild: true
targetPlatform: Android
unityVersion: 2022.3.4f1
projectPath: .
buildsPath: |
builds
buildName: PHANTO-${{ github.run_id }}
androidVersionCode: ${{ env.APK_VERSION_FROM_RUN }}
- name: Store apk
uses: actions/upload-artifact@v2
with:
name: PHANTO-${{ github.run_id }}
path: builds