mirror of
https://github.com/oxyroid/M3UAndroid.git
synced 2025-08-06 14:59:48 +08:00
76 lines
2.1 KiB
YAML
76 lines
2.1 KiB
YAML
name: Android CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '**.txt'
|
|
- '.github/**'
|
|
- '.idea/**'
|
|
- 'fastlane/**'
|
|
- '!.github/workflows/**'
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup JDK
|
|
id: setup-java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: 17
|
|
distribution: "zulu"
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
with:
|
|
gradle-home-cache-cleanup: true
|
|
|
|
- name: Clean GMD
|
|
run: ./gradlew cleanManagedDevices --unused-only
|
|
|
|
- name: Build production app
|
|
run: ./gradlew :app:smartphone:assembleRelease
|
|
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
|
|
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
|
|
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
|
|
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
|
|
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
|
|
|
|
- name: Build production tv app
|
|
run: ./gradlew :app:tv:assembleRelease
|
|
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
path: |
|
|
app/smartphone/build/outputs/apk/release/*.apk
|
|
app/tv/build/outputs/apk/release/*.apk
|
|
|
|
- name: Upload To Telegram
|
|
if: github.event_name != 'pull_request'
|
|
uses: xireiki/channel-post@v1.0.10
|
|
with:
|
|
bot_token: ${{ secrets.BOT_TOKEN }}
|
|
chat_id: ${{ secrets.CHAT_ID }}
|
|
api_id: ${{ secrets.API_ID }}
|
|
api_hash: ${{ secrets.API_HASH }}
|
|
large_file: true
|
|
method: sendFile
|
|
path: |
|
|
app/smartphone/build/outputs/apk/snapshotChannelRichCodec/release/*.apk
|
|
app/tv/build/outputs/apk/release/*.apk
|