Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
29c04330ce
1 changed files with 13 additions and 8 deletions
21
.github/workflows/android.yml
vendored
21
.github/workflows/android.yml
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
name: lobe-chat-android
|
name: Android CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -7,6 +7,7 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -18,14 +19,18 @@ jobs:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# Step 2: Set up JDK (Java 11 is used for Android projects)
|
# Step 2: Set up JDK (Java 17 is required for Android projects)
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
|
|
||||||
# Step 3: Cache Gradle dependencies
|
# Step 3: Grant execute permission for gradlew
|
||||||
|
- name: Grant execute permission for gradlew
|
||||||
|
run: chmod +x ./gradlew
|
||||||
|
|
||||||
|
# Step 4: Cache Gradle dependencies
|
||||||
- name: Cache Gradle packages
|
- name: Cache Gradle packages
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
|
@ -36,15 +41,15 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gradle-
|
${{ runner.os }}-gradle-
|
||||||
|
|
||||||
# Step 4: Download Dependencies (Gradle Wrapper)
|
# Step 5: Download Dependencies (Gradle Wrapper)
|
||||||
- name: Download Dependencies
|
- name: Download Dependencies
|
||||||
run: ./gradlew --no-daemon clean build
|
run: ./gradlew --no-daemon clean build
|
||||||
|
|
||||||
# Step 5: Build APK
|
# Step 6: Build APK
|
||||||
- name: Build Debug APK
|
- name: Build Debug APK
|
||||||
run: ./gradlew --no-daemon assembleDebug
|
run: ./gradlew --no-daemon assembleDebug
|
||||||
|
|
||||||
# Step 6: Upload artifact (optional)
|
# Step 7: Upload artifact (optional)
|
||||||
- name: Upload APK
|
- name: Upload APK
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue