forked from QuestCraftPlusPlus/QCXR-XR-Wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (87 loc) · 3.33 KB
/
main.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
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
name: Build Wrapper
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
name: Build Wrapper
runs-on: windows-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4
# Cache
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# Build
- name: Build APK
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: Android
customImage: 'unityci/editor:windows-2021.3.37f1-android-3.1.0'
androidExportType: androidPackage
androidTargetSdkVersion: 32
# Export
- name: Export Project
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: Android
customImage: 'unityci/editor:windows-2021.3.37f1-android-3.1.0'
buildsPath: exported
allowDirtyBuild: true
androidExportType: androidStudioProject
androidTargetSdkVersion: 32
# Upload exported Android Studio project
- uses: actions/upload-artifact@v4
with:
name: Exported
path: exported
update:
name: Update IL2CPP repo
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: thewiilover/Wrapper-IL2CPP
token: ${{ secrets.PERSONAL_TOKEN }}
- name: Grab IL2CPP changes
uses: actions/download-artifact@v4
with:
name: Exported
- name: Copy Changes
run: |
cp -rf $GITHUB_WORKSPACE/Android/Android/unityLibrary/src/main/assets unityLibrary/src/main
cp -rf $GITHUB_WORKSPACE/Android/Android/unityLibrary/src/main/jniLibs unityLibrary/src/main
rm -rf $GITHUB_WORKSPACE/unityLibrary/src/main/Il2CppOutputProject
cp -rf $GITHUB_WORKSPACE/Android/Android/unityLibrary/src/main/Il2CppOutputProject unityLibrary/src/main
cp -rf $GITHUB_WORKSPACE/Android/Android/unityLibrary/src/main/jniStaticLibs unityLibrary/src/main
cp -rf $GITHUB_WORKSPACE/Android/Android/unityLibrary/src/main/res unityLibrary/src/main
cp -rf $GITHUB_WORKSPACE/Android/Android/unityLibrary/src/main/resources unityLibrary/src/main
cp -rf $GITHUB_WORKSPACE/Android/Android/launcher/src/main/res launcher/src/main
cp -f $GITHUB_WORKSPACE/Android/Android/launcher/src/main/AndroidManifest.xml launcher/src/main/AndroidManifest.xml
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Auto-update"
- name: Push changes
uses: ad-m/github-push-action@master
with:
repository: thewiilover/Wrapper-IL2CPP
github_token: ${{ secrets.PERSONAL_TOKEN }}