Skip to content

Commit d44a2f4

Browse files
committed
infra: build android debug artifacts on push
1 parent 0952c84 commit d44a2f4

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

.github/workflows/build-and-test.yaml

+44-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
paths:
66
- 'api/**'
77
- 'web/**'
8+
- 'android/**'
89
- '.github/workflows/build-and-test.yaml'
910

1011
workflow_dispatch:
@@ -62,4 +63,46 @@ jobs:
6263
cd web
6364
pnpm install
6465
pnpm run prisma:generate
65-
pnpm run build
66+
pnpm run build
67+
68+
build-android:
69+
name: Build and Test Android
70+
runs-on: ubuntu-latest
71+
72+
steps:
73+
- name: Checkout repository
74+
uses: actions/checkout@v4
75+
with:
76+
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref }}
77+
78+
- name: Set up JDK 17
79+
uses: actions/setup-java@v3
80+
with:
81+
java-version: '17'
82+
distribution: 'temurin'
83+
cache: gradle
84+
85+
- name: Setup Gradle
86+
uses: gradle/gradle-build-action@v2
87+
with:
88+
gradle-version: '7.2'
89+
90+
- name: Grant execute permission for gradlew
91+
run: chmod +x android/gradlew
92+
93+
- name: Build Android app
94+
run: |
95+
cd android
96+
./gradlew assembleDebug
97+
98+
# - name: Run Android tests
99+
# run: |
100+
# cd android
101+
# ./gradlew testDebugUnitTest
102+
103+
- name: Upload build artifacts
104+
uses: actions/upload-artifact@v3
105+
with:
106+
name: android-apk
107+
path: android/app/build/outputs/apk/debug/app-debug.apk
108+
retention-days: 7

0 commit comments

Comments
 (0)