Skip to content

Commit 438ff1d

Browse files
authored
Feat/android build workflows (#2)
1 parent 4a1c022 commit 438ff1d

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

.github/actions/android-build.yml renamed to .github/workflows/android-build.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ on:
66
dist-path:
77
description: path to folder containing code to include in app. Omit if code not in a subfolder
88
type: string
9-
default: ""
109
jobs:
1110
android_build:
1211
runs-on: ubuntu-latest
1312
steps:
1413
- name: Checkout app builder code
1514
uses: actions/checkout@v4
1615
with:
17-
repository: "supportingami/programming-club-builder.git"
16+
repository: "supportingami/programming-club-builder"
17+
ref: main
1818

1919
- name: Checkout app repo code
2020
uses: actions/checkout@v4
@@ -23,12 +23,25 @@ jobs:
2323
sparse-checkout: ${{ inputs.dist-path }}
2424
sparse-checkout-cone-mode: false
2525

26+
- name: Move repo code in nested folder
27+
if: ${{ inputs.dist-path }}
28+
run: mv dist/${{ inputs.dist-path }}/* dist
29+
30+
- name: Debug checkout files
31+
run: |
32+
echo $(ls)
33+
echo $(ls dist)
34+
2635
- name: Setup Node
2736
uses: actions/setup-node@v4
2837
with:
2938
node-version: 20.x
3039
cache: npm
3140

41+
# Install required 3rd-party dependencies. Use 'ci' command to ensure install consistent
42+
- name: Install dependencies
43+
run: npm ci
44+
3245
# TODO - generate assets
3346
# TODO - allow capacitor overrides
3447
- name: Add android platform
@@ -39,24 +52,24 @@ jobs:
3952
run: npx cap sync
4053

4154
- name: Set up JDK 17
42-
uses: actions/setup-java@v3
55+
uses: actions/setup-java@v4
4356
with:
4457
distribution: "zulu"
4558
java-version: "17"
4659
cache: "gradle"
4760

4861
- name: Setup Android SDK
49-
uses: android-actions/setup-android@v2
62+
uses: android-actions/setup-android@v3
5063

51-
- name: Build Android Debug Bundle
64+
- name: Build Android Debug APK
5265
working-directory: ./android
5366
run: ./gradlew :app:assembleDebug
5467

55-
- name: Upload Debug Bundle
68+
- name: Upload Debug Bundle
5669
uses: actions/upload-artifact@v4
5770
with:
58-
name: debug_aab
59-
path: ./android/app/build/outputs/bundle/debug/app-debug.aab
71+
name: android
72+
path: ./android/app/build/outputs/apk/debug/app-debug.apk
6073

6174
# - name: Build Android Release Bundle
6275
# working-directory: ./android

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ In this file paste the code
1717
```
1818

1919
## Test
20+
21+
Once the action has finished it will provide download links to android debug apk
22+
23+
This can be installed directly on any android device

capacitor.config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"appId": "com.example.app",
33
"appName": "programming-club",
4-
"bundledWebRuntime": false,
54
"webDir": "dist",
65
"plugins": {
76
"SplashScreen": {
87
"launchShowDuration": 0
98
}
109
}
11-
}
10+
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)