workflows: android-workflow: triggering: events: - push branch_patterns: - pattern: 'main' include: true source: true name: Ionic Capacitor Android Workflow max_build_duration: 120 environment: vars: PACKAGE_NAME: "io.codemagic.ionicsample" node: latest scripts: - name: Install npm dependencies for Ionic Capacitor project script: | npm install - name: Set up local.properties script: | echo "sdk.dir=$ANDROID_SDK_ROOT" > "$CM_BUILD_DIR/android/local.properties" - name: Update dependencies and copy web assets to native project script: | npx cap sync - name: Build Android release script: | cd android ./gradlew bundleDebug artifacts: - android/app/build/outputs/**/*.apk