-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Android CI with Gradle | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
# Step 1: Checkout repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
# Step 2: Set up JDK 17 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
# Step 3: Setup Gradle and cache dependencies | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
# Step 4: Build Debug APK | ||
- name: Build Debug APK | ||
run: ./gradlew assembleDebug | ||
|
||
# Step 5: Build Release APK | ||
- name: Build Release APK | ||
run: ./gradlew assembleRelease | ||
|
||
# Step 6: Upload Debug APK as Artifact | ||
- name: Upload Debug APK | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: debug-apk | ||
path: app/build/outputs/apk/debug/app-debug.apk | ||
|
||
# Step 7: Upload Release APK as Artifact | ||
- name: Upload Release APK | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: release-apk | ||
path: app/build/outputs/apk/release/app-release.apk | ||
|
||
dependency-submission: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
# Generates and submits a dependency graph | ||
- name: Generate and submit dependency graph | ||
uses: gradle/actions/dependency-submission@v4 |