This commit is contained in:
Viktor Sarström 2021-04-26 10:56:07 +02:00
parent 2362eb94a0
commit e28aeb4a47
8 changed files with 203 additions and 12 deletions

182
bitrise.yml Normal file
View File

@ -0,0 +1,182 @@
---
format_version: '8'
default_step_lib_source: 'https://github.com/bitrise-io/bitrise-steplib.git'
project_type: react-native
trigger_map:
- push_branch: main
workflow: primary
- pull_request_source_branch: '*'
workflow: primary
workflows:
deploy:
description: >
## Configure Android part of the deploy workflow
To generate a signed APK:
1. Open the **Workflow** tab of your project on Bitrise.io
1. Add **Sign APK step right after Android Build step**
1. Click on **Code Signing** tab
1. Find the **ANDROID KEYSTORE FILE** section
1. Click or drop your file on the upload file field
1. Fill the displayed 3 input fields:
1. **Keystore password**
1. **Keystore alias**
1. **Private key password**
1. Click on **[Save metadata]** button
That's it! From now on, **Sign APK** step will receive your uploaded
files.
## Configure iOS part of the deploy workflow
To generate IPA:
1. Open the **Workflow** tab of your project on Bitrise.io
1. Click on **Code Signing** tab
1. Find the **PROVISIONING PROFILE** section
1. Click or drop your file on the upload file field
1. Find the **CODE SIGNING IDENTITY** section
1. Click or drop your file on the upload file field
1. Click on **Workflows** tab
1. Select deploy workflow
1. Select **Xcode Archive & Export for iOS** step
1. Open **Force Build Settings** input group
1. Specify codesign settings
Set **Force code signing with Development Team**, **Force code signing
with Code Signing Identity**
and **Force code signing with Provisioning Profile** inputs regarding to
the uploaded codesigning files
1. Specify manual codesign style
If the codesigning files, are generated manually on the Apple Developer
Portal,
you need to explicitly specify to use manual coedsign settings
(as ejected rn projects have xcode managed codesigning turned on).
To do so, add 'CODE_SIGN_STYLE="Manual"' to 'Additional options for
xcodebuild call' input
## To run this workflow
If you want to run this workflow manually:
1. Open the app's build list page
2. Click on **[Start/Schedule a Build]** button
3. Select **deploy** in **Workflow** dropdown input
4. Click **[Start Build]** button
Or if you need this workflow to be started by a GIT event:
1. Click on **Triggers** tab
2. Setup your desired event (push/tag/pull) and select **deploy** workflow
3. Click on **[Done]** and then **[Save]** buttons
The next change in your repository that matches any of your trigger map
event will start **deploy** workflow.
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4: {}
- script@1:
title: Do anything with Script step
- yarn@0:
inputs:
- workdir: packages/app
- command: install
- install-missing-android-tools@2:
inputs:
- gradlew_path: $PROJECT_LOCATION/gradlew
- android-build@0:
inputs:
- project_location: $PROJECT_LOCATION
- certificate-and-profile-installer@1: {}
- recreate-user-schemes@1:
inputs:
- project_path: $BITRISE_PROJECT_PATH
- cocoapods-install@2: {}
- xcode-archive@3:
inputs:
- project_path: $BITRISE_PROJECT_PATH
- scheme: $BITRISE_SCHEME
- export_method: $BITRISE_EXPORT_METHOD
- configuration: Release
- deploy-to-bitrise-io@1: {}
primary:
steps:
- activate-ssh-key@4:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4: {}
- script@1:
title: Do anything with Script step
- yarn@0:
inputs:
- workdir: packages/app
- command: install
- yarn@0:
inputs:
- workdir: packages/app
- command: test
- deploy-to-bitrise-io@1: {}
description: Build and deploy
app:
envs:
- opts:
is_expand: false
PROJECT_LOCATION: packages/app/android
- opts:
is_expand: false
MODULE: app
- opts:
is_expand: false
VARIANT: debug
- opts:
is_expand: false
BITRISE_PROJECT_PATH: packages/app/ios/app.xcworkspace
- opts:
is_expand: false
BITRISE_SCHEME: app
- opts:
is_expand: false
BITRISE_EXPORT_METHOD: ad-hoc

View File

@ -213,6 +213,7 @@ dependencies {
} else {
implementation jscFlavor
}
}
// Run this once to be able to run the application with BUCK

View File

@ -36,3 +36,11 @@ allprojects {
maven { url 'https://www.jitpack.io' }
}
}
subprojects {
configurations.all {
resolutionStrategy {
force 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
}
}
}

View File

@ -0,0 +1 @@
02dd6e8cd1138dfaefd4e955be6e632bb9d61118ebc852e464cbf7f913017022a61be5c76153ce2218ccbd83e3f9aec2

View File

@ -279,7 +279,7 @@ PODS:
- react-native-simple-toast (1.1.3):
- React-Core
- Toast (~> 4.0.0)
- react-native-webview (11.3.2):
- react-native-webview (11.4.2):
- React-Core
- React-perflogger (0.64.0)
- React-RCTActionSheet (0.64.0):
@ -542,7 +542,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: 49cbe4b43e445b06bf29199b6ad2057649e4c8f5
FBReactNativeSpec: 0b41cf9e0b74ffa97ededb3d0210da5b4710474c
FBReactNativeSpec: 0bd88dccda1f83b7a01f01706f3728c8b36a5b30
Flipper: d3da1aa199aad94455ae725e9f3aa43f3ec17021
Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
Flipper-Folly: f7a3caafbd74bda4827954fd7a6e000e36355489
@ -570,7 +570,7 @@ SPEC CHECKSUMS:
react-native-restart: 733a51ad137f15b0f8dc34c4082e55af7da00979
react-native-safe-area-context: f0906bf8bc9835ac9a9d3f97e8bde2a997d8da79
react-native-simple-toast: bf002828cf816775a6809f7a9ec3907509bce11f
react-native-webview: 71567b6bf3d4e55914e580d720cc8f7df64af817
react-native-webview: 4c85a3e5de574ee8c2c0985b4bebbdd240f49304
React-perflogger: 9c547d8f06b9bf00cb447f2b75e8d7f19b7e02af
React-RCTActionSheet: 3080b6e12e0e1a5b313c8c0050699b5c794a1b11
React-RCTAnimation: 3f96f21a497ae7dabf4d2f150ee43f906aaf516f

View File

@ -53,8 +53,8 @@
"react-native-svg-transformer": "0.14.3",
"react-native-tab-view": "2.15.2",
"react-native-typography": "1.4.1",
"react-native-webview": "11.3.2",
"rn-actionsheet-module": "1.0.3",
"react-native-webview": "11.4.2",
"rn-actionsheet-module": "https://github.com/viktorlarsson/rn-actionsheet-module",
"use-async-storage": "1.2.0",
"yup": "0.32.9"
},

View File

@ -7547,10 +7547,10 @@ react-native-typography@1.4.1:
resolved "https://registry.npmjs.org/react-native-typography/-/react-native-typography-1.4.1.tgz"
integrity sha512-dc9Zfs4jUdq4ygx4/KwO6jKTERBu6cRrfPJGntw/pA+D6BMjlWfMNuhZ/69vf4Zpsnt9s4AGe+Z/V1QFYaCXAA==
react-native-webview@11.3.2:
version "11.3.2"
resolved "https://registry.npmjs.org/react-native-webview/-/react-native-webview-11.3.2.tgz"
integrity sha512-j+0eUKYY3MCO7DRhZaIPY6+0q+Yo1Iyhz5f7cde+i5vR71CcJ/60DhZPw5SSqXZnZiVX0Myz1D46u8dtfRmQFg==
react-native-webview@11.4.2:
version "11.4.2"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.4.2.tgz#5fe8867135e7395b16c08e8d26bc8064b5c0dfac"
integrity sha512-reGWtlFCQCgZEROy0IJaI5iMhrhFzedNIFlj0d6eo0K6T91eeKaoDr24ebBvqmeemOCj0ZYtzX19qiInRznhLA==
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"
@ -7965,10 +7965,9 @@ rimraf@~2.6.2:
dependencies:
glob "^7.1.3"
rn-actionsheet-module@1.0.3:
"rn-actionsheet-module@https://github.com/viktorlarsson/rn-actionsheet-module":
version "1.0.3"
resolved "https://registry.npmjs.org/rn-actionsheet-module/-/rn-actionsheet-module-1.0.3.tgz"
integrity sha512-wm+VqcGEfmf5XcnyH7g98jqaAqj0EyjqaN1hIfip2qO/yMkg+ZX2gfus2kLJrvXRfEk9Rax40TnkzOEt6My5tA==
resolved "https://github.com/viktorlarsson/rn-actionsheet-module#44ae59bff1b61177b0e63d73383bce4582008b47"
rsvp@^4.8.4:
version "4.8.5"