You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+34-13
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,17 @@
2
2
3
3
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project.
4
4
5
+
## Prerequisites
6
+
7
+
Follow the official guide for getting your [RN Environment setup](https://reactnative.dev/docs/0.72/environment-setup)
8
+
9
+
React Native requires different versions of the tools/languages you might be using already. Even among RN releases there might be different versions required. We recommend using the following tools to manage your toolsets:
- To manage different releases of Xcode. The latest release of RN is usually supported by the latest Xcode release but previous releases might not.
13
+
-[Mise](https://mise.jdx.dev/dev-tools/) or [ASDF](https://asdf-vm.com/guide/getting-started.html) for everything else
14
+
- Node, Ruby and Java version support might change amongst RN releases. These version managers let you manage multiple versions of them.
15
+
5
16
## Development workflow
6
17
7
18
To get started with the project, run `yarn bootstrap` in the root directory to install the required dependencies for each package:
@@ -11,7 +22,7 @@ yarn bootstrap
11
22
```
12
23
13
24
While developing, you can run the [example app](/example/) to test your changes.
14
-
25
+
code
15
26
To start the packager:
16
27
17
28
```sh
@@ -52,16 +63,16 @@ yarn test
52
63
The are also end-to-end tests. First you will have to build the app and then run the tests:
53
64
54
65
```
55
-
# Start the server (*note there's a separate e2e command*
56
-
yarn example start:e2e
66
+
# Start the server (*note there's a separate e2e command*)
67
+
yarn e2e start:e2e
57
68
58
69
# iOS
59
-
yarn example e2e:build:ios
60
-
yarn example e2e:test:ios
70
+
yarn e2e e2e:build:ios
71
+
yarn e2e e2e:test:ios
61
72
62
73
# Android
63
-
yarn example e2e:build:android
64
-
yarn example e2e:test:android
74
+
yarn e2e e2e:build:android
75
+
yarn e2e e2e:test:android
65
76
```
66
77
67
78
To edit the Objective-C / Swift files, open `example/ios/AnalyticsReactNativeExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > @segment/analytics-react-native`.
@@ -100,12 +111,12 @@ The `package.json` file contains various scripts for common tasks:
100
111
-`yarn example start`: start the Metro server for the example app.
101
112
-`yarn example android`: run the example app on Android.
102
113
-`yarn example ios`: run the example app on iOS.
103
-
-`yarn example e2e:build:ios`: builds the example app using detox
104
-
-`yarn example e2e:test:ios`: runs the e2e on a simulator(headless if not ran manually)
105
-
-`yarn example e2e:build:android`: builds the example app using detox
106
-
-`yarn example e2e:test:android`: runs the e2e on an emulator
107
-
-`yarn example ios:deeplink`: opens the ios app via deep link (example app must already be installed)
108
-
-`yarn example android:deeplink`: opens the Android app via deep link (example app must already be installed)
114
+
-`yarn e2e e2e:build:ios`: builds the e2e app using detox
115
+
-`yarn e2e e2e:test:ios`: runs the e2e on a simulator(headless if not ran manually)
116
+
-`yarn e2e e2e:build:android`: builds the e2e app using detox
117
+
-`yarn e2e e2e:test:android`: runs the e2e on an emulator
118
+
-`yarn e2e ios:deeplink`: opens the ios app via deep link (example app must already be installed)
119
+
-`yarn e2e android:deeplink`: opens the Android app via deep link (example app must already be installed)
109
120
110
121
### Sending a pull request
111
122
@@ -118,3 +129,13 @@ When you're sending a pull request:
118
129
- Review the documentation to make sure it looks good.
119
130
- Follow the pull request template when opening a pull request.
120
131
- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
132
+
133
+
## Release
134
+
135
+
Release is automated in GHA. By default `yarn release` won't let you trigger a release from your personal computer.
136
+
137
+
To trigger a release go to Actions. Select the `Publish` workflow and trigger a new job.
138
+
139
+
Automatically the workflow will analyze the commits, bump versions, create changesets, build and release to NPM the packages that need so.
140
+
141
+
The CI/CD is automated using [semantic-release](https://github.com/semantic-release/semantic-release).
0 commit comments