Created
July 30, 2019 16:03
-
-
Save kanhirun/656bea68b92b2637ca5f0d0ed57f0ce9 to your computer and use it in GitHub Desktop.
Example bitrise.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| format_version: '8' | |
| default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git | |
| project_type: react-native | |
| trigger_map: | |
| - push_branch: "*" | |
| workflow: primary | |
| - pull_request_source_branch: "*" | |
| workflow: primary | |
| workflows: | |
| deploy: | |
| description: "## Configure Android part of the deploy workflow\n\nTo generate | |
| a signed APK:\n\n1. Open the **Workflow** tab of your project on Bitrise.io\n1. | |
| Add **Sign APK step right after Android Build step**\n1. Click on **Code Signing** | |
| tab\n1. Find the **ANDROID KEYSTORE FILE** section\n1. Click or drop your file | |
| on the upload file field\n1. Fill the displayed 3 input fields:\n1. **Keystore | |
| password**\n1. **Keystore alias**\n1. **Private key password**\n1. Click on | |
| **[Save metadata]** button\n\nThat's it! From now on, **Sign APK** step will | |
| receive your uploaded files.\n\n## Configure iOS part of the deploy workflow\n\nTo | |
| generate IPA:\n\n1. Open the **Workflow** tab of your project on Bitrise.io\n1. | |
| Click on **Code Signing** tab\n1. Find the **PROVISIONING PROFILE** section\n1. | |
| Click or drop your file on the upload file field\n1. Find the **CODE SIGNING | |
| IDENTITY** section\n1. Click or drop your file on the upload file field\n1. | |
| Click on **Workflows** tab\n1. Select deploy workflow\n1. Select **Xcode Archive | |
| & Export for iOS** step\n1. Open **Force Build Settings** input group\n1. Specify | |
| codesign settings\nSet **Force code signing with Development Team**, **Force | |
| code signing with Code Signing Identity** \nand **Force code signing with Provisioning | |
| Profile** inputs regarding to the uploaded codesigning files\n1. Specify manual | |
| codesign style\nIf the codesigning files, are generated manually on the Apple | |
| Developer Portal, \nyou need to explicitly specify to use manual coedsign settings | |
| \ \n(as ejected rn projects have xcode managed codesigning turned on). \nTo | |
| do so, add 'CODE_SIGN_STYLE=\"Manual\"' to 'Additional options for xcodebuild | |
| call' input\n\n## To run this workflow\n\nIf you want to run this workflow manually:\n\n1. | |
| Open the app's build list page\n2. Click on **[Start/Schedule a Build]** button\n3. | |
| Select **deploy** in **Workflow** dropdown input\n4. Click **[Start Build]** | |
| button\n\nOr if you need this workflow to be started by a GIT event:\n\n1. Click | |
| on **Triggers** tab\n2. Setup your desired event (push/tag/pull) and select | |
| **deploy** workflow\n3. Click on **[Done]** and then **[Save]** buttons\n\nThe | |
| next change in your repository that matches any of your trigger map event will | |
| start **deploy** workflow.\n" | |
| steps: | |
| - [email protected]: | |
| run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' | |
| - [email protected]: {} | |
| - [email protected]: | |
| title: Do anything with Script step | |
| - [email protected]: | |
| inputs: | |
| - command: install | |
| - [email protected]: | |
| inputs: | |
| - gradlew_path: "$PROJECT_LOCATION/gradlew" | |
| - [email protected]: | |
| inputs: | |
| - project_location: "$PROJECT_LOCATION" | |
| - [email protected]: {} | |
| - [email protected]: | |
| inputs: | |
| - project_path: "$BITRISE_PROJECT_PATH" | |
| - scheme: "$BITRISE_SCHEME" | |
| - export_method: "$BITRISE_EXPORT_METHOD" | |
| - configuration: Release | |
| - [email protected]: {} | |
| primary: | |
| steps: | |
| - [email protected]: | |
| run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}' | |
| title: activate-ssh | |
| - [email protected]: | |
| title: git-clone | |
| - [email protected]: | |
| inputs: | |
| - command: install | |
| title: yarn-install | |
| - [email protected]: | |
| inputs: | |
| - command: install -g detox-cli | |
| title: detox-cli | |
| - [email protected]: | |
| title: build and run tests | |
| inputs: | |
| - content: |- | |
| #!/usr/bin/env bash | |
| set -ex | |
| brew tap wix/brew | |
| brew install applesimutils | |
| detox build -c ios.sim.release | |
| detox test -c ios.sim.release --cleanup | |
| app: | |
| envs: | |
| - opts: | |
| is_expand: false | |
| PROJECT_LOCATION: android/ | |
| - opts: | |
| is_expand: false | |
| MODULE: app | |
| - opts: | |
| is_expand: false | |
| VARIANT: release | |
| - opts: | |
| is_expand: false | |
| BITRISE_PROJECT_PATH: ios/SampleProjectReactNative.xcodeproj | |
| - opts: | |
| is_expand: false | |
| BITRISE_SCHEME: SampleProjectReactNative | |
| - opts: | |
| is_expand: false | |
| BITRISE_EXPORT_METHOD: development |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment