Skip to content

Commit 4a1c022

Browse files
authored
Merge pull request #1 from supportingami/feat/android-build-action
test: ci
2 parents 80605ef + 87ae302 commit 4a1c022

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

.github/actions/android-build.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
name: Android - Build
33
on:
44
workflow_call:
5+
inputs:
6+
dist-path:
7+
description: path to folder containing code to include in app. Omit if code not in a subfolder
8+
type: string
9+
default: ""
510
jobs:
611
android_build:
712
runs-on: ubuntu-latest
@@ -14,8 +19,9 @@ jobs:
1419
- name: Checkout app repo code
1520
uses: actions/checkout@v4
1621
with:
17-
path: "src"
18-
fetch-depth: 0
22+
path: "dist"
23+
sparse-checkout: ${{ inputs.dist-path }}
24+
sparse-checkout-cone-mode: false
1925

2026
- name: Setup Node
2127
uses: actions/setup-node@v4
@@ -42,12 +48,16 @@ jobs:
4248
- name: Setup Android SDK
4349
uses: android-actions/setup-android@v2
4450

45-
- name: Build Android Debug APK
46-
working-directory: apps/picsa-apps/extension-app-native/android
51+
- name: Build Android Debug Bundle
52+
working-directory: ./android
4753
run: ./gradlew :app:assembleDebug
4854

49-
- name: Build Android Release Bundle
50-
working-directory: apps/picsa-apps/extension-app-native/android
51-
run: ./gradlew :app:bundleRelease
55+
- name: Upload Debug Bundle
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: debug_aab
59+
path: ./android/app/build/outputs/bundle/debug/app-debug.aab
5260

53-
- name: Save build artifacts
61+
# - name: Build Android Release Bundle
62+
# working-directory: ./android
63+
# run: ./gradlew :app:bundleRelease

.github/actions/test-android-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ on:
88
jobs:
99
android_build:
1010
uses: supportingami/programming-club-builder/.github/workflows/android-build.yml@main
11+
with:
12+
dist-path: demo

CONTRIBUTORS.MD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ npx capacitor-assets generate
2020
Once the platform has been added code can be compiled and imported into the android app
2121

2222
```bash
23-
npm run build
2423
npx cap sync
2524
```
2625

0 commit comments

Comments
 (0)