Skip to content

Instantly share code, notes, and snippets.

@modemlooper
Last active October 9, 2023 13:59
Show Gist options
  • Save modemlooper/57caac0d091ad6be13178b8be8f5722a to your computer and use it in GitHub Desktop.
Save modemlooper/57caac0d091ad6be13178b8be8f5722a to your computer and use it in GitHub Desktop.
bitrise
--
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: ionic
workflows:
Deploy_Android:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8.1: {}
- activate-build-cache-for-gradle@1: {}
- npm@1:
inputs:
- npm_version: 6.14.15
- command: install
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
npm install @capacitor/core
npm install @capacitor/android
npx cap add android
npx cap sync android
- set-java-version@1:
inputs:
- set_java_version: '17'
- change-android-versioncode-and-versionname@1:
inputs:
- build_gradle_path: "$BITRISE_SOURCE_DIR/android/app/build.gradle"
- android-build@1:
inputs:
- module: app
- variant: release
- build_type: aab
- project_location: "$BITRISE_SOURCE_DIR/android"
- sign-apk@1:
inputs:
- output_name: app-release
- google-play-deploy@3:
timeout: 300
inputs:
- track: internal
- package_name: "$APP_BUNDLE_ID"
- service_account_json_key_path: "$BITRISEIO_BITRISEIO_SERVICE_ACCOUNT_JSON_KEY_URL_URL"
envs:
- opts:
is_expand: false
APP_BUNDLE_ID: "$APP_BUNDLE_ID"
Deploy_iOS:
steps:
- build-router-start@0:
inputs:
- workflows: Deploy_Android
- access_token: "$ACCESS_TOKEN"
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8.1: {}
- npm@1:
inputs:
- npm_version: 6.14.15
- command: install
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
npm install @capacitor/core
npm install @capacitor/ios
npx cap add ios
npx cap sync ios
- recreate-user-schemes@1:
inputs:
- project_path: ios/App/App.xcworkspace
- manage-ios-code-signing@1:
inputs:
- project_path: ios/App/App.xcworkspace
- distribution_method: app-store
- scheme: App
- set-xcode-build-number@1:
inputs:
- build_short_version_string: 1.0.1
- plist_path: ios/App/App/Info.plist
- xcode-archive@4.8:
inputs:
- scheme: App
- automatic_code_signing: api-key
- xcodebuild_options: ''
- distribution_method: app-store
- project_path: ios/App/App.xcworkspace
- deploy-to-itunesconnect-application-loader@1:
inputs:
- platform: ios
- connection: api_key
Deploy_only_ios:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8.1: {}
- npm@1:
inputs:
- npm_version: 6.14.15
- command: install
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
npm install @capacitor/core
npm install @capacitor/ios
npx cap add ios
npx cap sync ios
- recreate-user-schemes@1:
inputs:
- project_path: ios/App/App.xcworkspace
- manage-ios-code-signing@1:
inputs:
- project_path: ios/App/App.xcworkspace
- distribution_method: app-store
- scheme: App
- set-xcode-build-number@1:
inputs:
- build_short_version_string: 1.0.1
- plist_path: ios/App/App/Info.plist
- xcode-archive@4.8:
inputs:
- scheme: App
- automatic_code_signing: api-key
- xcodebuild_options: ''
- distribution_method: app-store
- project_path: ios/App/App.xcworkspace
- deploy-to-itunesconnect-application-loader@1:
inputs:
- platform: ios
- connection: api_key
Dev_iOS:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@8.1: {}
- npm@1:
inputs:
- npm_version: 6.14.15
- command: install
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
npm install
npm install @capacitor/core
npm install @capacitor/ios
npx cap add ios
npx cap sync ios
- recreate-user-schemes@1:
inputs:
- project_path: ios/App/App.xcworkspace
- manage-ios-code-signing@1:
inputs:
- project_path: ios/App/App.xcworkspace
- distribution_method: app-store
- scheme: App
- set-xcode-build-number@1:
inputs:
- build_short_version_string: 1.0.0
- plist_path: ios/App/App/Info.plist
- xcode-archive@4.8:
inputs:
- scheme: App
- automatic_code_signing: api-key
- xcodebuild_options: ''
- distribution_method: development
- project_path: ios/App/App.xcworkspace
- deploy-to-bitrise-io@2: {}
meta:
bitrise.io:
stack: osx-xcode-14.3.x-ventura
trigger_map:
- push_branch: developments
workflow: Dev_iOS
- push_branch: release
workflow: Deploy_iOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment