Skip to content

Commit

Permalink
Feat/android build workflows (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke authored Sep 26, 2024
1 parent 4a1c022 commit 438ff1d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
dist-path:
description: path to folder containing code to include in app. Omit if code not in a subfolder
type: string
default: ""
jobs:
android_build:
runs-on: ubuntu-latest
steps:
- name: Checkout app builder code
uses: actions/checkout@v4
with:
repository: "supportingami/programming-club-builder.git"
repository: "supportingami/programming-club-builder"
ref: main

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

- name: Move repo code in nested folder
if: ${{ inputs.dist-path }}
run: mv dist/${{ inputs.dist-path }}/* dist

- name: Debug checkout files
run: |
echo $(ls)
echo $(ls dist)
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm

# Install required 3rd-party dependencies. Use 'ci' command to ensure install consistent
- name: Install dependencies
run: npm ci

# TODO - generate assets
# TODO - allow capacitor overrides
- name: Add android platform
Expand All @@ -39,24 +52,24 @@ jobs:
run: npx cap sync

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"

- name: Setup Android SDK
uses: android-actions/setup-android@v2
uses: android-actions/setup-android@v3

- name: Build Android Debug Bundle
- name: Build Android Debug APK
working-directory: ./android
run: ./gradlew :app:assembleDebug

- name: Upload Debug Bundle
- name: Upload Debug Bundle
uses: actions/upload-artifact@v4
with:
name: debug_aab
path: ./android/app/build/outputs/bundle/debug/app-debug.aab
name: android
path: ./android/app/build/outputs/apk/debug/app-debug.apk

# - name: Build Android Release Bundle
# working-directory: ./android
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ In this file paste the code
```

## Test

Once the action has finished it will provide download links to android debug apk

This can be installed directly on any android device
3 changes: 1 addition & 2 deletions capacitor.config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"appId": "com.example.app",
"appName": "programming-club",
"bundledWebRuntime": false,
"webDir": "dist",
"plugins": {
"SplashScreen": {
"launchShowDuration": 0
}
}
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 438ff1d

Please sign in to comment.