Skip to content

Commit b7f0908

Browse files
committed
ci: Update Publish CI and instructions
1 parent d989acd commit b7f0908

File tree

5 files changed

+44
-25
lines changed

5 files changed

+44
-25
lines changed

.github/workflows/publish.yml

-10
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,3 @@ jobs:
5555
yarn install --no-immutable
5656
yarn e2e install --no-immutable
5757
yarn example install --no-immutable
58-
59-
- name: Commit Updated App Locks
60-
run: |
61-
git config user.email "[email protected]"
62-
git config user.name "semantic-release-bot"
63-
git add yarn.lock
64-
git add examples/E2E/yarn.lock
65-
git add examples/AnalyticsReactNativeExample/yarn.lock
66-
git commit -m "chore(release): update lockfiles [skip ci]" --no-verify
67-
git push

CONTRIBUTING.md

+34-13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project.
44

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:
10+
11+
- [Xcodes](https://github.com/XcodesOrg/XcodesApp)
12+
- 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+
516
## Development workflow
617

718
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
1122
```
1223

1324
While developing, you can run the [example app](/example/) to test your changes.
14-
25+
code
1526
To start the packager:
1627

1728
```sh
@@ -52,16 +63,16 @@ yarn test
5263
The are also end-to-end tests. First you will have to build the app and then run the tests:
5364

5465
```
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
5768
5869
# 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
6172
6273
# 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
6576
```
6677

6778
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:
100111
- `yarn example start`: start the Metro server for the example app.
101112
- `yarn example android`: run the example app on Android.
102113
- `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)
109120

110121
### Sending a pull request
111122

@@ -118,3 +129,13 @@ When you're sending a pull request:
118129
- Review the documentation to make sure it looks good.
119130
- Follow the pull request template when opening a pull request.
120131
- 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).

examples/E2E-73/.mise.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[tools]
2+
java = "zulu-17"
3+
node = "18"
4+
ruby = '3.3.0'
5+
cocoapods = "latest"

examples/E2E-73/.rtx.toml

-2
This file was deleted.

examples/E2E/.mise.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[tools]
2+
java = "zulu-11"
3+
node = "18"
4+
ruby = '3.3.0'
5+
cocoapods = "latest"

0 commit comments

Comments
 (0)