2023-10-02 11:55:56 +01:00
|
|
|
workflows:
|
|
|
|
|
android-workflow:
|
|
|
|
|
name: Ionic Capacitor Android Workflow
|
|
|
|
|
max_build_duration: 120
|
|
|
|
|
environment:
|
|
|
|
|
android_signing:
|
2023-10-02 12:16:07 +01:00
|
|
|
- GabineteDigital
|
2023-10-02 11:55:56 +01:00
|
|
|
vars:
|
|
|
|
|
PACKAGE_NAME: "com.gpr.gabinetedigital"
|
|
|
|
|
node: latest
|
|
|
|
|
scripts:
|
|
|
|
|
- name: Install npm dependencies for Ionic Capacitor project
|
|
|
|
|
script: |
|
2023-10-02 12:20:14 +01:00
|
|
|
npm install --force
|
2023-10-02 11:55:56 +01:00
|
|
|
- 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: |
|
|
|
|
|
# if you don't need to update native dependencies, use this:
|
|
|
|
|
# npx cap copy
|
|
|
|
|
#
|
|
|
|
|
# to update native dependencies, use this command:
|
2023-10-02 12:33:41 +01:00
|
|
|
ionic cap build android --prod
|
2023-10-02 11:55:56 +01:00
|
|
|
- name: Build Android release
|
|
|
|
|
script: |
|
|
|
|
|
cd android
|
|
|
|
|
./gradlew bundleRelease \
|
2023-10-02 12:41:13 +01:00
|
|
|
-PversionCode=1 \
|
|
|
|
|
-PversionName=1.0.0
|
2023-10-02 11:55:56 +01:00
|
|
|
artifacts:
|
|
|
|
|
- android/app/build/outputs/**/*.apk
|
|
|
|
|
publishing:
|
|
|
|
|
email:
|
|
|
|
|
recipients:
|
|
|
|
|
- user_1@example.com
|
|
|
|
|
- user_2@example.com
|
|
|
|
|
notify:
|
|
|
|
|
success: true
|
|
|
|
|
failure: false
|