chore: upgrade to ionic v8 & capacitorjs v6 #8
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
name: Build an Android APK | |
on: | |
push: | |
paths: | |
- '.github/workflows/build-android.yml' | |
- 'ionic_ui_templates/**' | |
- '!ionic_ui_templates/**/*.md' | |
- '!ionic_ui_templates/ios/**' | |
branches: | |
- main | |
defaults: | |
run: | |
working-directory: ionic_ui_templates | |
jobs: | |
build-apk: | |
permissions: | |
contents: write | |
name: Build Android APK | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Setup Web environment to install packages. | |
- name: Setup Web environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
# only required if project is not in the root | |
cache-dependency-path: ionic_ui_templates/package-lock.json | |
# Setup Java environment in order to build the Android app. | |
- name: Setup Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Install Ionic CLI | |
run: npm install -g @ionic/cli | |
- name: Install packages | |
run: npm ci --legacy-peer-deps | |
- name: Build the ionic project for Android | |
run: ionic capacitor build android --prod --no-open | |
- name: Build Android debug APK | |
working-directory: ionic_ui_templates/android | |
run: ./gradlew assembleDebug | |
- name: Save apk file as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ionic_ui_templates | |
path: ionic_ui_templates/android/app/build/outputs/apk/debug/app-debug.apk |