mirror of https://github.com/FongMi/TV.git
parent
00443a6a4a
commit
9794eea61f
@ -1,44 +1,47 @@ |
||||
name: Build MyBox 64bit Versions |
||||
name: Build TVBox APK |
||||
|
||||
on: |
||||
push: |
||||
branches: |
||||
- fongmi # 只在 fongmi 分支 push 时触发 |
||||
- fongmi |
||||
pull_request: |
||||
branches: |
||||
- fongmi # 只在 fongmi 分支 PR 时触发 |
||||
- fongmi |
||||
|
||||
jobs: |
||||
build: |
||||
runs-on: ubuntu-latest |
||||
|
||||
steps: |
||||
- name: Checkout Code |
||||
uses: actions/checkout@v4 |
||||
- name: Checkout code |
||||
uses: actions/checkout@v3 |
||||
|
||||
- name: Set up JDK 17 |
||||
uses: actions/setup-java@v4 |
||||
- name: Setup JDK 11 |
||||
uses: actions/setup-java@v3 |
||||
with: |
||||
java-version: '17' |
||||
distribution: 'temurin' |
||||
cache: gradle |
||||
java-version: '11' |
||||
|
||||
- name: Accept Android SDK Licenses |
||||
run: yes | sdkmanager --licenses || true |
||||
|
||||
- name: Grant execute permission for gradlew |
||||
run: chmod +x gradlew |
||||
|
||||
- name: Build 64bit APKs |
||||
# 编译 Leanback 和 Mobile 的 arm64-v8a 版本 |
||||
run: | |
||||
./gradlew assembleLeanbackArm64_v8aDebug \ |
||||
assembleMobileArm64_v8aDebug \ |
||||
-Pandroid.injected.signing.config.enable=false |
||||
- name: Setup Python 3.10 |
||||
uses: actions/setup-python@v4 |
||||
with: |
||||
python-version: '3.10' |
||||
|
||||
- name: Upload All APKs |
||||
uses: actions/upload-artifact@v4 |
||||
- name: Cache Gradle |
||||
uses: actions/cache@v3 |
||||
with: |
||||
path: | |
||||
~/.gradle/caches |
||||
~/.gradle/wrapper |
||||
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} |
||||
restore-keys: | |
||||
gradle-${{ runner.os }}- |
||||
|
||||
- name: Build APK |
||||
run: ./gradlew assembleDebug |
||||
|
||||
- name: Upload APK |
||||
uses: actions/upload-artifact@v3 |
||||
with: |
||||
name: MyBox-64bit-APKs |
||||
# 使用通配符匹配所有生成的 debug APK,防止路径层级错误 |
||||
path: app/build/outputs/apk/**/debug/*.apk |
||||
name: tvbox-debug-apk |
||||
path: app/build/outputs/apk/debug/*.apk |
||||
|
||||
Loading…
Reference in new issue