Skip to content

Fix dependencies

Fix dependencies #56

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build App Release Signed Bundle
# Note that you have to bump the versionCode in android/app/build.gradle
on:
push:
branches: [ main ]
jobs:
build:
name: Build App Release Signed Bundle
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install Ionic CLI
run: sudo npm install -g @ionic/cli
- name: Install app dependencies
run: npm install
- name: Run config (Set envs)
run: npm run config
env:
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
- name: Build app
run: ionic build --prod --configuration prodAndroid --release
- name: Capacitor update
run: npx cap update
- name: Capacitor copy
run: npx cap copy
- name: Build app bundle
run: cd android && gradle bundle
- name: Extract Android signing key from env
run: |
echo "${{ secrets.RELEASE_KEYSTORE }}" > android/MacrozillaKeyStore.jks.base64
base64 -d android/MacrozillaKeyStore.jks.base64 > android/MacrozillaKeyStore.decrypted.jks
- name: Sign dev build
run: jarsigner -keystore android/MacrozillaKeyStore.decrypted.jks -storepass "${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" -signedjar ./android/app/build/outputs/bundle/release/app-release-signed.aab ./android/app/build/outputs/bundle/release/app-release.aab macrozillakey
- name: Upload release bundle
uses: actions/upload-artifact@v2
with:
name: app-release
path: android/app/build/outputs/bundle/release/app-release-signed.aab
retention-days: 60