generated from MobilePorting/FNF-PsychEngine-Mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (96 loc) · 3.94 KB
/
mobile-release.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
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Android
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
Mobile:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {update: false}
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup Haxe
uses: krdlab/setup-haxe@master
with:
haxe-version: 4.3.6
- name: Restore Previous Cache
id: cache-debug-build-android-restore
uses: actions/cache/restore@main
with:
path: |
/home/runner/haxelib/
export/release/android/haxe/
export/release/android/obj/
key: cache-android-build-new
- name: Setup Haxelib
run: haxelib setup ~/haxelib
- name: Install Libraries
if: matrix.config.update
run: |
yes | haxelib git hxcpp https://github.com/mcagabe19-stuff/hxcpp --quiet
yes | haxelib git lime https://github.com/mcagabe19-stuff/lime --quiet
haxelib install openfl 9.3.3 --quiet
haxelib install flixel 5.6.1 --quiet
haxelib install flixel-addons 3.2.2 --quiet
haxelib install flixel-tools 1.5.1 --quiet
haxelib install hscript-iris 1.1.0 --quiet
haxelib install tjson 1.4.0 --quiet
yes | haxelib git flxanimate https://github.com/Dot-Stuff/flxanimate 768740a56b26aa0c072720e0d1236b94afe68e3e --quiet
yes | haxelib git linc_luajit https://github.com/mcagabe19-stuff/linc_luajit-rewriten --quiet
yes | haxelib git hxvlc https://github.com/MAJigsaw77/hxvlc 70e7f5f3e76d526ac6fb8f0e6665efe7dfda589d --quiet --skip-dependencies
yes | haxelib git funkin.vis https://github.com/FunkinCrew/funkVis 9cac20547dd41505928eeca9c762c7e6b348f6f3 --quiet --skip-dependencies
yes | haxelib git grig.audio https://gitlab.com/haxe-grig/grig.audio.git cbf91e2180fd2e374924fe74844086aab7891666 --quiet
yes | haxelib git extension-androidtools https://github.com/MAJigsaw77/extension-androidtools 727693f0a76c6e396df675bb0ed95d7639a4db01 --quiet --skip-dependencies
- name: Configure Android
run: |
haxelib run lime config ANDROID_SDK $ANDROID_HOME
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_LATEST_HOME
haxelib run lime config JAVA_HOME $JAVA_HOME_17_X64
haxelib run lime config ANDROID_SETUP true
- name: Compile
run: haxelib run lime build android -D officialBuild
- name: Clear Previous Cache
uses: actions/github-script@main
with:
script: |
try {
const caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
})
if (typeof caches.data.actions_caches != null && caches.data.actions_caches.length > 0) {
for (const cache of caches.data.actions_caches) {
if (cache.key == "cache-android-build-new") {
console.log('Clearing ' + cache.key + '...')
await github.rest.actions.deleteActionsCacheById({
owner: context.repo.owner,
repo: context.repo.repo,
cache_id: cache.id,
})
console.log("Previous Cache Cleared!")
}
}
}
} catch (error) {
console.log(error.message);
}
- name: Save Current Cache
id: cache-release-build-android-save
uses: actions/cache/save@main
with:
path: |
/home/runner/haxelib/
export/release/android/haxe/
export/release/android/obj/
key: cache-android-build-new
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: PsychEngine-release
path: export/release/android/bin/app/build/outputs/apk/release
if-no-files-found: error