2c1b3cfca6
Build & Push Docker Images / test-backend (push) Successful in 24s
Build & Push Docker Images / test-frontend (push) Successful in 23s
Build & Push Docker Images / build-backend (push) Successful in 2m22s
Build & Push Docker Images / build-frontend (push) Successful in 57s
199 lines
5.9 KiB
YAML
199 lines
5.9 KiB
YAML
---
|
|
format_version: "11"
|
|
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
|
|
|
|
project_type: capacitor
|
|
|
|
app:
|
|
envs:
|
|
- BITRISE_PROJECT_PATH: ""
|
|
- BITRISE_SCHEME: ""
|
|
|
|
trigger_map:
|
|
- push_branch: main
|
|
workflow: deploy
|
|
- pull_request_source_branch: "*"
|
|
workflow: test
|
|
- tag: "*"
|
|
workflow: deploy
|
|
|
|
workflows:
|
|
# ── Shared setup ──────────────────────────────────────────
|
|
_setup:
|
|
steps:
|
|
- activate-ssh-key@4:
|
|
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
|
|
- git-clone@8: {}
|
|
- nvm@1:
|
|
inputs:
|
|
- node_version: "20"
|
|
- script@1:
|
|
title: Install dependencies & build frontend
|
|
inputs:
|
|
- content: |
|
|
#!/bin/bash
|
|
set -ex
|
|
npm install
|
|
npm install --prefix frontend
|
|
npm run build --prefix frontend
|
|
|
|
# ── Android test / PR build ──────────────────────────────
|
|
test:
|
|
before_run:
|
|
- _setup
|
|
steps:
|
|
- script@1:
|
|
title: Sync Android native project
|
|
inputs:
|
|
- content: |
|
|
#!/bin/bash
|
|
set -ex
|
|
npx cap sync android
|
|
- script@1:
|
|
title: Install Android SDK components
|
|
inputs:
|
|
- content: |
|
|
#!/bin/bash
|
|
set -ex
|
|
yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \
|
|
"platforms;android-36" \
|
|
"build-tools;36.0.0" \
|
|
"platform-tools" || true
|
|
- android-build@1:
|
|
title: Build Android APK (debug)
|
|
inputs:
|
|
- project_location: android
|
|
- module: app
|
|
- variant: debug
|
|
|
|
# ── Android deploy ───────────────────────────────────────
|
|
deploy_android:
|
|
before_run:
|
|
- _setup
|
|
steps:
|
|
- script@1:
|
|
title: Sync Android native project
|
|
inputs:
|
|
- content: |
|
|
#!/bin/bash
|
|
set -ex
|
|
npx cap sync android
|
|
- script@1:
|
|
title: Install Android SDK components
|
|
inputs:
|
|
- content: |
|
|
#!/bin/bash
|
|
set -ex
|
|
yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \
|
|
"platforms;android-36" \
|
|
"build-tools;36.0.0" \
|
|
"platform-tools" || true
|
|
- android-build@1:
|
|
title: Build Android AAB (release)
|
|
inputs:
|
|
- project_location: android
|
|
- module: app
|
|
- variant: release
|
|
- deploy-to-bitrise-io@2: {}
|
|
|
|
# ── iOS test / PR build ─────────────────────────────────
|
|
test_ios:
|
|
before_run:
|
|
- _setup
|
|
steps:
|
|
- script@1:
|
|
title: Sync iOS native project
|
|
inputs:
|
|
- content: |
|
|
#!/bin/bash
|
|
set -ex
|
|
npx cap sync ios
|
|
- cocoapods-install@2:
|
|
inputs:
|
|
- podfile_path: ios/App/Podfile
|
|
- xcode-archive@4:
|
|
title: Build iOS (simulator)
|
|
inputs:
|
|
- project_path: ios/App/App.xcodeproj
|
|
- scheme: App
|
|
- configuration: Debug
|
|
- destination: platform=iOS Simulator,name=iPhone 15,OS=latest
|
|
- output_tool: xcodebuild
|
|
|
|
# ── iOS deploy ───────────────────────────────────────────
|
|
deploy_ios:
|
|
before_run:
|
|
- _setup
|
|
steps:
|
|
- script@1:
|
|
title: Sync iOS native project
|
|
inputs:
|
|
- content: |
|
|
#!/bin/bash
|
|
set -ex
|
|
npx cap sync ios
|
|
- cocoapods-install@2:
|
|
inputs:
|
|
- podfile_path: ios/App/Podfile
|
|
- xcode-archive@4:
|
|
title: Archive iOS (release)
|
|
inputs:
|
|
- project_path: ios/App/App.xcodeproj
|
|
- scheme: App
|
|
- configuration: Release
|
|
- destination: generic/platform=iOS
|
|
- output_tool: xcodebuild
|
|
- export_method: app-store
|
|
- deploy-to-bitrise-io@2: {}
|
|
|
|
# ── Full deploy (both platforms) ─────────────────────────
|
|
deploy:
|
|
before_run:
|
|
- _setup
|
|
steps:
|
|
# Android
|
|
- script@1:
|
|
title: Sync Android native project
|
|
inputs:
|
|
- content: |
|
|
#!/bin/bash
|
|
set -ex
|
|
npx cap sync android
|
|
- script@1:
|
|
title: Install Android SDK components
|
|
inputs:
|
|
- content: |
|
|
#!/bin/bash
|
|
set -ex
|
|
yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \
|
|
"platforms;android-36" \
|
|
"build-tools;36.0.0" \
|
|
"platform-tools" || true
|
|
- android-build@1:
|
|
title: Build Android AAB (release)
|
|
inputs:
|
|
- project_location: android
|
|
- module: app
|
|
- variant: release
|
|
# iOS
|
|
- script@1:
|
|
title: Sync iOS native project
|
|
inputs:
|
|
- content: |
|
|
#!/bin/bash
|
|
set -ex
|
|
npx cap sync ios
|
|
- cocoapods-install@2:
|
|
inputs:
|
|
- podfile_path: ios/App/Podfile
|
|
- xcode-archive@4:
|
|
title: Archive iOS (release)
|
|
inputs:
|
|
- project_path: ios/App/App.xcodeproj
|
|
- scheme: App
|
|
- configuration: Release
|
|
- destination: generic/platform=iOS
|
|
- output_tool: xcodebuild
|
|
- export_method: app-store
|
|
- deploy-to-bitrise-io@2: {}
|