Skip to content

Commit ab975d4

Browse files
Merge pull request #1165 from GetStream/develop
Next Major Release
2 parents 5ab6726 + 765c9a7 commit ab975d4

File tree

1,205 files changed

+48307
-42270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,205 files changed

+48307
-42270
lines changed

.detoxrc.json

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,6 @@
33
"runnerConfig": "e2e/config.json",
44
"skipLegacyWorkersInjection": true,
55
"apps": {
6-
"ios.native.debug": {
7-
"name": "iOS NativeMessaging Debug",
8-
"type": "ios.app",
9-
"binaryPath": "examples/NativeMessaging/ios/build/Build/Products/Debug-iphonesimulator/NativeMessaging.app",
10-
"build": "cd examples/NativeMessaging && xcodebuild -workspace ios/NativeMessaging.xcworkspace -scheme NativeMessaging -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build"
11-
},
12-
"ios.native.release": {
13-
"name": "iOS NativeMessaging Release",
14-
"type": "ios.app",
15-
"binaryPath": "examples/NativeMessaging/ios/build/Build/Products/Release-iphonesimulator/NativeMessaging.app",
16-
"build": "cd examples/NativeMessaging && xcodebuild -workspace ios/NativeMessaging.xcworkspace -scheme NativeMessaging -configuration Release -sdk iphonesimulator -derivedDataPath ios/build"
17-
},
18-
"android.native.debug": {
19-
"name": "Android NativeMessaging Debug",
20-
"type": "android.apk",
21-
"binaryPath": "examples/NativeMessaging/android/app/build/outputs/apk/debug/app-debug.apk",
22-
"build": "cd examples/NativeMessaging/android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug"
23-
},
24-
"android.native.release": {
25-
"name": "Android NativeMessaging Release",
26-
"type": "android.apk",
27-
"binaryPath": "examples/NativeMessaging/android/app/build/outputs/apk/release/app-release.apk",
28-
"build": "cd examples/NativeMessaging/android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=release"
29-
},
306
"ios.sample.debug": {
317
"name": "iOS SampleApp Debug",
328
"type": "ios.app",
@@ -42,8 +18,8 @@
4218
"android.sample.debug": {
4319
"name": "Android SampleApp Debug",
4420
"type": "android.apk",
45-
"binaryPath": "examples/SampleApp/android/app/build/outputs/apk/release/app-release.apk",
46-
"build": "cd examples/SampleApp/android && ./gradlew assembleRelease assembleAndroidTest -DtestBuildType=debug"
21+
"binaryPath": "examples/SampleApp/android/app/build/outputs/apk/debug/app-debug.apk",
22+
"build": "cd examples/SampleApp/android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug"
4723
},
4824
"android.sample.release": {
4925
"name": "Android SampleApp Release",
@@ -62,27 +38,11 @@
6238
"emulator": {
6339
"type": "android.emulator",
6440
"device": {
65-
"avdName": "Pixel4"
41+
"avdName": "Pixel_29_AOSP"
6642
}
6743
}
6844
},
6945
"configurations": {
70-
"ios.native.debug": {
71-
"device": "simulator",
72-
"app": "ios.native.debug"
73-
},
74-
"ios.native.release": {
75-
"device": "simulator",
76-
"app": "ios.native.release"
77-
},
78-
"android.native.debug": {
79-
"device": "emulator",
80-
"app": "android.native.debug"
81-
},
82-
"android.native.release": {
83-
"device": "emulator",
84-
"app": "android.native.release"
85-
},
8646
"ios.sample.debug": {
8747
"device": "simulator",
8848
"app": "ios.sample.debug"

.github/workflows/check-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- develop
77
- master
8-
- 'v[0-9]+.[0-9]+.[0-9]+'
8+
- 'v[0-9]+.[0-9]+.[0-9]+*beta*'
99
types: [opened, synchronize]
1010

1111
jobs:
@@ -22,6 +22,6 @@ jobs:
2222
# for the sdk package
2323
run: yarn --frozen-lockfile && yarn bootstrap-ci
2424
- name: Lint
25-
run: yarn lint
25+
run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx'
2626
- name: Test
2727
run: yarn test:unit

.github/workflows/docusaurus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
- name: push
1616
uses: GetStream/push-stream-chat-docusaurus-action@main
1717
with:
18-
target-branch: ${{ github.ref == 'refs/heads/master' && 'production' || 'staging' }}
18+
target-branch: 'production'
1919
env:
2020
DOCUSAURUS_GH_TOKEN: ${{ secrets.DOCUSAURUS_GH_TOKEN }}

.github/workflows/legacy-sample-distribution.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ name: legacy-sample-distribution
33
on:
44
push:
55
branches:
6-
- develop
7-
paths:
8-
- examples/SampleApp
6+
- v4.0.0
97
jobs:
108
build_and_deploy_ios_firebase:
119
runs-on: [macos-latest]
@@ -19,10 +17,11 @@ jobs:
1917
run: npm install -g firebase-tools
2018
- name: RN setup
2119
run: |
20+
cd package
2221
yarn;
2322
cd native-package
2423
yarn;
25-
cd ../examples/SampleApp
24+
cd ../../examples/SampleApp
2625
yarn;
2726
cd ios
2827
pod install
@@ -45,10 +44,11 @@ jobs:
4544
- name: RN setup
4645
run: |
4746
yarn add global react-native-cli;
47+
cd package
4848
yarn;
4949
cd native-package
5050
yarn;
51-
cd ../examples/SampleApp
51+
cd ../../examples/SampleApp
5252
yarn;
5353
- name: Build
5454
run: |

.github/workflows/next-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Installation && Build SDK
3131
run: yarn --frozen-lockfile && yarn bootstrap-ci
3232
- name: Lint
33-
run: yarn lerna-workspaces run lint
33+
run: yarn lerna-workspaces run lint && (cd docusaurus; npx prettier --check '**/*.mdx')
3434
- name: Publish Next Release
3535
run: GITHUB_SHORT_SHA="$(git rev-parse --short $GITHUB_SHA)" yarn release-next
3636
env:

.github/workflows/release.yml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
name: Release
2-
3-
on:
4-
push:
5-
branches:
6-
- master
7-
8-
jobs:
9-
publish-release:
10-
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
node-version: [12.x]
14-
steps:
15-
- uses: actions/checkout@v2
16-
with:
17-
token: ${{ secrets.VERSION_BUMP_TOKEN }}
18-
# pulls all commits (needed for semantic release to correctly version)
19-
fetch-depth: '0'
20-
# pulls all tags (needed for semantic release to correctly version)
21-
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
22-
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v2
24-
with:
25-
node-version: ${{ matrix.node-version }}
26-
registry-url: 'https://registry.npmjs.org'
27-
- name: Prepare git
28-
run: |
29-
git config --global user.name "Vishal Narkhede"
30-
git config --global user.email "[email protected]"
31-
- name: Installation && Build SDK
32-
run: yarn --frozen-lockfile && yarn bootstrap-ci
33-
- name: Lint
34-
run: yarn lerna-workspaces run lint
35-
- name: Publish Release
36-
run: yarn release
37-
env:
38-
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
39-
GH_TOKEN: ${{ secrets.VERSION_BUMP_TOKEN }}
40-
- name: Merge back changes
41-
run: |
42-
git stash
43-
git checkout develop
44-
git pull origin develop
45-
git merge master -m "chore: merge back release [skip ci]"
46-
git push origin develop
1+
#name: Release
2+
#
3+
##on:
4+
## push:
5+
## branches:
6+
## - master
7+
#
8+
#jobs:
9+
# publish-release:
10+
# runs-on: ubuntu-latest
11+
# strategy:
12+
# matrix:
13+
# node-version: [12.x]
14+
# steps:
15+
# - uses: actions/checkout@v2
16+
# with:
17+
# token: ${{ secrets.VERSION_BUMP_TOKEN }}
18+
# # pulls all commits (needed for semantic release to correctly version)
19+
# fetch-depth: '0'
20+
# # pulls all tags (needed for semantic release to correctly version)
21+
# - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
22+
# - name: Use Node.js ${{ matrix.node-version }}
23+
# uses: actions/setup-node@v2
24+
# with:
25+
# node-version: ${{ matrix.node-version }}
26+
# registry-url: 'https://registry.npmjs.org'
27+
# - name: Prepare git
28+
# run: |
29+
# git config --global user.name "Vishal Narkhede"
30+
# git config --global user.email "[email protected]"
31+
# - name: Installation && Build SDK
32+
# run: yarn --frozen-lockfile && yarn bootstrap-ci
33+
# - name: Lint
34+
# run: yarn lerna-workspaces run lint && cd docusaurus && npx prettier --check '**/*.mdx'
35+
# - name: Publish Release
36+
# run: yarn release
37+
# env:
38+
# NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
39+
# GH_TOKEN: ${{ secrets.VERSION_BUMP_TOKEN }}
40+
# - name: Merge back changes
41+
# run: |
42+
# git stash
43+
# git checkout develop
44+
# git pull origin develop
45+
# git merge master -m "chore: merge back release [skip ci]"
46+
# git push origin develop

.github/workflows/sample-distribution.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ name: sample-distribution
33
on:
44
push:
55
branches:
6-
- develop
7-
paths:
8-
- examples/SampleApp
6+
- v4.0.0
97
jobs:
108
build_and_deploy_ios_testflight_qa:
119
runs-on: [macos-latest]
@@ -18,14 +16,17 @@ jobs:
1816
cd examples/SampleApp/ios
1917
bundle update --bundler
2018
- name: RN setup
21-
run: |
22-
yarn;
23-
cd native-package
24-
yarn;
25-
cd ../examples/SampleApp
26-
yarn;
27-
cd ios
28-
pod install
19+
uses: nick-invision/retry@v2
20+
with:
21+
timeout_minutes: 10
22+
max_attempts: 3
23+
command: |
24+
yarn && yarn bootstrap-ci;
25+
cd package/native-package
26+
yarn;
27+
cd ../../examples/SampleApp
28+
cd ios
29+
pod update RCT-Folly --no-repo-update && pod install
2930
- name: Build and release Testflight QA
3031
env:
3132
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
@@ -45,13 +46,15 @@ jobs:
4546
with:
4647
java-version: 1.8
4748
- name: RN setup
48-
run: |
49-
yarn add global react-native-cli;
50-
yarn;
51-
cd native-package
52-
yarn;
53-
cd ../examples/SampleApp
54-
yarn;
49+
uses: nick-invision/retry@v2
50+
with:
51+
timeout_minutes: 10
52+
max_attempts: 3
53+
command: |
54+
yarn add global react-native-cli;
55+
yarn && yarn bootstrap-ci;
56+
cd package/native-package
57+
yarn;
5558
- name: Build
5659
run: |
5760
cd examples/SampleApp
@@ -68,6 +71,7 @@ jobs:
6871
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
6972
aws-region: us-east-1
7073
- name: Upload APK
74+
# https://getstream.io/downloads/rn-sample-app.apk
7175
run: |
7276
cp examples/SampleApp/android/app/build/outputs/apk/release/app-release.apk rn-sample-app.apk
7377
aws s3 cp rn-sample-app.apk s3://${{ secrets.AWS_S3_BUCKET }} --sse AES256

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
node_modules
22
NEXT_RELEASE_CHANGELOG.md
3+
artifacts
4+
e2e/.env
35
*.log

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This repo includes 4 example apps. One made with Expo, one Native JavaScript cod
4646

4747
- [Expo example](./examples/ExpoMessaging)
4848
- [Native example](./examples/NativeMessaging)
49-
- [Typescript example](./examples/TypescriptMessaging)
49+
- [Typescript example](./examples/TypeScriptMessaging)
5050
- [Fully featured messaging application](./examples/SampleApp)
5151

5252
Besides, our team maintains a dedicated repository for fully-fledged sample applications and demos at [GetStream/react-native-samples](https://github.com/GetStream/react-native-samples). Please consider checking following sample applications:

bin/release.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
# shellcheck disable=SC2103
3+
4+
set -eux
5+
6+
if ! git diff --exit-code || ! git diff --cached --exit-code; then
7+
echo "ERROR: UNCOMMITTED CHANGES"
8+
exit 1
9+
fi
10+
11+
echo "Mention the tag. Default - latest"
12+
read tag
13+
14+
if [ -z "$tag" ]
15+
then
16+
tag="latest"
17+
fi
18+
19+
cd native-package
20+
npm version --no-git-tag-version "$1"
21+
sed -e 's|"stream-chat-react-native-core": "[^"]*"|"stream-chat-react-native-core": "'"$1"'"|g' -i.bak package.json
22+
rm package.json.bak
23+
24+
cd ../expo-package
25+
npm version --no-git-tag-version "$1"
26+
sed -e 's|"stream-chat-react-native-core": "[^"]*"|"stream-chat-react-native-core": "'"$1"'"|g' -i.bak package.json
27+
rm package.json.bak
28+
cd ..
29+
30+
sed -e 's|"version": "[^"]*"|"version": "'"$1"'"|g' -i.bak src/version.json
31+
rm src/version.json.bak
32+
33+
git add {expo,native}-package/package.json
34+
git add src/version.json
35+
36+
git add expo-package/yarn.lock
37+
git add native-package/yarn.lock
38+
39+
npm version "$1" --force
40+
41+
npm publish --tag="$tag"
42+
43+
cd native-package
44+
npm publish --tag="$tag"
45+
46+
47+
cd ../expo-package
48+
npm publish --tag="$tag"
49+
50+
git push --follow-tags

0 commit comments

Comments
 (0)