-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (79 loc) · 2.54 KB
/
Copy pathmain_Android.yml
File metadata and controls
86 lines (79 loc) · 2.54 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
name: Actions Android Dev 😎
on:
workflow_dispatch: {}
jobs:
build:
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# projectPath:
# - test-project
unityVersion:
- 2022.3.56f1
targetPlatform:
- Android # Build an Android player.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3
with:
path: ${{ matrix.projectPath }}/Library
key:
Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-${{
hashFiles(matrix.projectPath) }}
restore-keys: |
Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}-
Library-${{ matrix.projectPath }}-
Library-
- if: matrix.targetPlatform == 'Android'
uses: jlumbroso/free-disk-space@v1.2.0
- name: Clean Up Disk Space
run: |
echo "Cleaning up disk space..."
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo apt-get clean
- name: Check Disk Usage
run: df -h
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue'
- uses: actions/upload-artifact@v4
with:
name: build-Android
path: build/Android
- name: Clean up
uses: jlumbroso/free-disk-space@v1.2.0
deploy:
name: Butler Push to Itch
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: build-Android
path: build/Android
# Upload to Itch
- name: Butler Push
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: android
ITCH_GAME: ${{vars.ITCHIO_PAGE}}
ITCH_USER: peryloth
PACKAGE: build/Android
- name: Cleanup to avoid storage limit
if: always()
uses: geekyeggo/delete-artifact@v1
with:
name: build-Android