File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' nb4a.properties'
9+ jobs :
10+ libcore :
11+ name : Native Build (LibCore)
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+ - name : Golang Status
17+ run : find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status
18+ - name : Libcore Status
19+ run : git ls-files libcore | xargs cat | sha1sum > libcore_status
20+ - name : LibCore Cache
21+ id : cache
22+ uses : actions/cache@v4
23+ with :
24+ path : |
25+ app/libs/libcore.aar
26+ key : ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
27+ - name : Install Golang
28+ if : steps.cache.outputs.cache-hit != 'true'
29+ uses : actions/setup-go@v5
30+ with :
31+ go-version : ^1.25
32+ - name : Native Build
33+ if : steps.cache.outputs.cache-hit != 'true'
34+ run : ./run lib core
35+ build :
36+ name : Build OSS APK
37+ runs-on : ubuntu-latest
38+ needs :
39+ - libcore
40+ steps :
41+ - name : Checkout
42+ uses : actions/checkout@v4
43+ - name : Golang Status
44+ run : find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status
45+ - name : Libcore Status
46+ run : git ls-files libcore | xargs cat | sha1sum > libcore_status
47+ - name : LibCore Cache
48+ uses : actions/cache@v4
49+ with :
50+ path : |
51+ app/libs/libcore.aar
52+ key : ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
53+ - name : Gradle cache
54+ uses : actions/cache@v4
55+ with :
56+ path : ~/.gradle
57+ key : gradle-oss-${{ hashFiles('**/*.gradle.kts') }}
58+ - name : Gradle Build
59+ env :
60+ BUILD_PLUGIN : none
61+ run : |
62+ echo "sdk.dir=${ANDROID_HOME}" > local.properties
63+ echo "ndk.dir=${ANDROID_HOME}/ndk/25.0.8775105" >> local.properties
64+ export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
65+ ./run init action gradle
66+ KEYSTORE_PASS="${{ secrets.KEYSTORE_PASS }}" ALIAS_NAME="${{ secrets.ALIAS_NAME }}" ALIAS_PASS="${{ secrets.ALIAS_PASS}}" ./gradlew app:assembleOssRelease
67+ APK=$(find app/build/outputs/apk -name '*arm64-v8a*.apk')
68+ APK=$(dirname $APK)
69+ echo "APK=$APK" >> $GITHUB_ENV
70+ - name : Upload Artifacts
71+ uses : actions/upload-artifact@v4
72+ with :
73+ name : NekoBoxs
74+ path : ${{ env.APK }}
You can’t perform that action at this time.
0 commit comments