mirror of https://github.com/FongMi/TV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.0 KiB
49 lines
1.0 KiB
name: Build Fongmi/TV
|
|
|
|
on:
|
|
push:
|
|
branches: [ fongmi ]
|
|
pull_request:
|
|
branches: [ fongmi ]
|
|
workflow_dispatch: # 允许手动触发
|
|
schedule:
|
|
- cron: '0 0 * * 0' # 每周日自动编译
|
|
|
|
env:
|
|
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
|
|
- name: Setup Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
|
|
- name: Grant execute permission
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build with Gradle
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
./gradlew assembleRelease
|
|
|
|
- name: Upload APK artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: TV-APK
|
|
path: app/build/outputs/apk/release/
|
|
retention-days: 7
|
|
|