react-native-insider 5.0.2 → 5.2.0-nh
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/CODEOWNERS +1 -1
- package/.github/workflows/dependabot_workflow.yml +1 -1
- package/.github/workflows/git-leak.yml +16 -3
- package/.github/workflows/react-native-insider_release.yml +65 -0
- package/.github/workflows/release_task_merger.yml +22 -0
- package/.github/workflows/release_version_setter.yml +43 -0
- package/RNInsider.podspec +2 -2
- package/android/build.gradle +13 -19
- package/android/src/main/java/com/useinsider/react/RNInsiderModule.java +15 -4
- package/index.js +35 -0
- package/ios/RNInsider/RNInsider.h +2 -0
- package/ios/RNInsider/RNInsider.m +36 -0
- package/package.json +1 -1
- package/release_version.sh +30 -0
- package/slack_notifier.sh +20 -0
- package/.github/workflows/master_release_with_tag.yml +0 -59
- package/.github/workflows/new_release.yml +0 -58
package/.github/CODEOWNERS
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
name: gitleaks
|
|
2
2
|
on: [push]
|
|
3
|
+
env:
|
|
4
|
+
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
|
|
3
5
|
|
|
4
6
|
jobs:
|
|
5
7
|
gitleaks:
|
|
6
|
-
runs-on: self-
|
|
8
|
+
runs-on: self-runner-node
|
|
7
9
|
steps:
|
|
8
|
-
-
|
|
10
|
+
- name: Checkout Repository
|
|
11
|
+
uses: actions/checkout@v3
|
|
9
12
|
with:
|
|
10
13
|
fetch-depth: '2'
|
|
14
|
+
- name: Clone GitLeak Action
|
|
15
|
+
uses: actions/checkout@v3
|
|
16
|
+
with:
|
|
17
|
+
repository: useinsider/gitleaks-action
|
|
18
|
+
ref: master
|
|
19
|
+
token: ${{ secrets.PAT }}
|
|
20
|
+
path: .github/actions/gitleaks-action
|
|
21
|
+
- name: Install Dependencies
|
|
22
|
+
run: npm install
|
|
23
|
+
working-directory: .github/actions/gitleaks-action
|
|
11
24
|
- name: gitleaks-action
|
|
12
|
-
uses:
|
|
25
|
+
uses: ./.github/actions/gitleaks-action
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: React Native Insider Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version_name:
|
|
7
|
+
required: true
|
|
8
|
+
description: The new version name of the SDK to be released (5.0.2)
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release:
|
|
12
|
+
if: github.actor == 'sonerdm' || github.actor == 'melih-useinsider'
|
|
13
|
+
name: Create Release
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout code
|
|
18
|
+
uses: actions/checkout@v3
|
|
19
|
+
with:
|
|
20
|
+
ref: develop
|
|
21
|
+
|
|
22
|
+
- name: Setup node
|
|
23
|
+
uses: actions/setup-node@v3.3.0
|
|
24
|
+
with:
|
|
25
|
+
node-version: 12
|
|
26
|
+
registry-url: https://registry.npmjs.org/
|
|
27
|
+
|
|
28
|
+
- name: Publish RN SDK
|
|
29
|
+
run: |
|
|
30
|
+
npm ci
|
|
31
|
+
npm test
|
|
32
|
+
npm publish
|
|
33
|
+
text=":atom_symbol: React Native SDK is published with version: ${{ github.event.inputs.version_name }}"
|
|
34
|
+
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
35
|
+
env:
|
|
36
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
37
|
+
SLACK_NOTIFIER_AUTH_KEY: ${{ secrets.SLACK_NOTIFIER_AUTH_KEY }}
|
|
38
|
+
|
|
39
|
+
release-nh:
|
|
40
|
+
needs: release
|
|
41
|
+
name: Create NH Release
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
|
|
44
|
+
steps:
|
|
45
|
+
- name: Checkout code
|
|
46
|
+
uses: actions/checkout@v3
|
|
47
|
+
with:
|
|
48
|
+
ref: develop-nh
|
|
49
|
+
|
|
50
|
+
- name: Setup node
|
|
51
|
+
uses: actions/setup-node@v3.3.0
|
|
52
|
+
with:
|
|
53
|
+
node-version: 12
|
|
54
|
+
registry-url: https://registry.npmjs.org/
|
|
55
|
+
|
|
56
|
+
- name: Publish RN NH SDK
|
|
57
|
+
run: |
|
|
58
|
+
npm ci
|
|
59
|
+
npm test
|
|
60
|
+
npm publish
|
|
61
|
+
text=":atom_symbol: React Native NH SDK is published with version: ${{ github.event.inputs.version_name }}-nh"
|
|
62
|
+
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
63
|
+
env:
|
|
64
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
65
|
+
SLACK_NOTIFIER_AUTH_KEY: ${{ secrets.SLACK_NOTIFIER_AUTH_KEY }}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Release Task Merger
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version_name:
|
|
7
|
+
required: true
|
|
8
|
+
description: The new version name of the SDK to be released (5.0.2)
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
sdk_releaser:
|
|
12
|
+
if: github.actor == 'sonerdm' || github.actor == 'melih-useinsider'
|
|
13
|
+
name: Trigger mobile-devops repository task merger
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Repository Dispatch
|
|
17
|
+
uses: peter-evans/repository-dispatch@v1
|
|
18
|
+
with:
|
|
19
|
+
token: ${{ secrets.GIT_TOKEN }}
|
|
20
|
+
repository: useinsider/mobile-devops
|
|
21
|
+
event-type: sdk-release-module
|
|
22
|
+
client-payload: '{"repo-name": "react-native-insider", "sdk_version_name": "${{ github.event.inputs.version_name }}"}'
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Release Version Setter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
repository_dispatch:
|
|
5
|
+
types: [trigger-release-version-setter]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
release_version_setter:
|
|
9
|
+
name: Run Version Setter
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout code
|
|
13
|
+
uses: actions/checkout@v3
|
|
14
|
+
with:
|
|
15
|
+
ref: develop
|
|
16
|
+
|
|
17
|
+
- name: Configure AWS credentials
|
|
18
|
+
uses: aws-actions/configure-aws-credentials@v1
|
|
19
|
+
with:
|
|
20
|
+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
21
|
+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
22
|
+
aws-region: eu-west-1
|
|
23
|
+
|
|
24
|
+
- name: Run release_version.sh
|
|
25
|
+
run: |
|
|
26
|
+
./release_version.sh ${{ github.event.client_payload.sdk_version_name }}
|
|
27
|
+
|
|
28
|
+
- name: Push changes to develop
|
|
29
|
+
run: |
|
|
30
|
+
git config --global user.name 'sonerdm'
|
|
31
|
+
git config --global user.email 'soner@useinsider.com'
|
|
32
|
+
git remote set-url origin https://x-access-token:${{ secrets.GIT_TOKEN }}@github.com/${{ github.repository }}
|
|
33
|
+
git commit -am "Release version ${{ github.event.client_payload.sdk_version_name }}"
|
|
34
|
+
git push
|
|
35
|
+
env:
|
|
36
|
+
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
|
37
|
+
|
|
38
|
+
- name: Notify QAs
|
|
39
|
+
run: |
|
|
40
|
+
text=":tatakae: React Native SDK is ready to test with version: ${{ github.event.client_payload.sdk_version_name }} <!subteam^SUUGFQNVA|mobileqa>"
|
|
41
|
+
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
42
|
+
env:
|
|
43
|
+
SLACK_NOTIFIER_AUTH_KEY: ${{ secrets.SLACK_NOTIFIER_AUTH_KEY }}
|
package/RNInsider.podspec
CHANGED
|
@@ -9,11 +9,11 @@ Pod::Spec.new do |s|
|
|
|
9
9
|
s.authors = package_json['author']
|
|
10
10
|
s.license = 'MIT'
|
|
11
11
|
s.platform = :ios, '10.0'
|
|
12
|
-
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/12.
|
|
12
|
+
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/12.5.0/InsiderMobileIOSFramework.zip'}
|
|
13
13
|
s.source_files = 'ios/RNInsider/*.{h,m}'
|
|
14
14
|
s.requires_arc = true
|
|
15
15
|
s.static_framework = true
|
|
16
16
|
s.dependency 'React'
|
|
17
|
-
s.dependency 'InsiderMobile', '12.
|
|
17
|
+
s.dependency 'InsiderMobile', '12.5.0'
|
|
18
18
|
s.dependency 'InsiderHybrid', '1.1.2'
|
|
19
19
|
end
|
package/android/build.gradle
CHANGED
|
@@ -8,7 +8,7 @@ buildscript {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
dependencies {
|
|
11
|
-
classpath 'com.android.tools.build:gradle:7.1
|
|
11
|
+
classpath 'com.android.tools.build:gradle:7.2.1'
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -19,34 +19,28 @@ def getVersionFromPartner(config, fallback) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
android {
|
|
22
|
-
compileSdkVersion getVersionFromPartner('compileSdkVersion',
|
|
22
|
+
compileSdkVersion getVersionFromPartner('compileSdkVersion', 32)
|
|
23
23
|
|
|
24
24
|
defaultConfig {
|
|
25
|
-
minSdkVersion getVersionFromPartner('minSdkVersion',
|
|
25
|
+
minSdkVersion getVersionFromPartner('minSdkVersion', 19)
|
|
26
26
|
multiDexEnabled true
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
repositories {
|
|
31
|
+
mavenCentral()
|
|
32
|
+
maven { url "https://maven.google.com" }
|
|
33
|
+
}
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
dependencies {
|
|
37
37
|
implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
|
|
38
|
-
implementation ('com.useinsider:insider:13.
|
|
39
|
-
implementation ('com.useinsider:insiderhybrid:1.1.
|
|
38
|
+
implementation ('com.useinsider:insider:13.4.0-nh')
|
|
39
|
+
implementation ('com.useinsider:insiderhybrid:1.1.4')
|
|
40
40
|
|
|
41
|
-
implementation 'com.google.android.play:core:1.10.1'
|
|
42
41
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
43
|
-
implementation 'com.google.android.gms:play-services-location:
|
|
44
|
-
implementation 'com.google.android.gms:play-services-ads:
|
|
45
|
-
implementation 'com.google.firebase:firebase-messaging:23.0.
|
|
42
|
+
implementation 'com.google.android.gms:play-services-location:20.0.0'
|
|
43
|
+
implementation 'com.google.android.gms:play-services-ads:21.0.0'
|
|
44
|
+
implementation 'com.google.firebase:firebase-messaging:23.0.5'
|
|
46
45
|
implementation 'androidx.lifecycle:lifecycle-process:2.4.1'
|
|
47
|
-
|
|
48
|
-
implementation 'com.huawei.hms:push:6.1.0.300'
|
|
49
|
-
implementation 'com.huawei.hms:ads-identifier:3.4.34.301'
|
|
50
|
-
implementation 'com.huawei.hms:location:4.0.4.300'
|
|
51
|
-
|
|
52
|
-
}
|
|
46
|
+
}
|
|
@@ -601,10 +601,6 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
601
601
|
}
|
|
602
602
|
String provider = Insider.Instance.getCurrentProvider(reactContext);
|
|
603
603
|
switch (provider) {
|
|
604
|
-
case "huawei":
|
|
605
|
-
com.huawei.hms.push.RemoteMessage hmsRemoteMessage = new com.huawei.hms.push.RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
|
606
|
-
Insider.Instance.handleHMSNotification(reactContext, hmsRemoteMessage);
|
|
607
|
-
break;
|
|
608
604
|
case "other":
|
|
609
605
|
case "google":
|
|
610
606
|
RemoteMessage fcmRemoteMessage = new RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
|
@@ -702,4 +698,19 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
702
698
|
}
|
|
703
699
|
});
|
|
704
700
|
}
|
|
701
|
+
|
|
702
|
+
@ReactMethod
|
|
703
|
+
public void signUpConfirmation() {
|
|
704
|
+
try {
|
|
705
|
+
Insider.Instance.signUpConfirmation();
|
|
706
|
+
} catch (Exception e) {
|
|
707
|
+
Insider.Instance.putException(e);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
@ReactMethod
|
|
712
|
+
public void setActiveForegroundPushView() {}
|
|
713
|
+
|
|
714
|
+
@ReactMethod
|
|
715
|
+
public void setForegroundPushCallback() {}
|
|
705
716
|
}
|
package/index.js
CHANGED
|
@@ -16,6 +16,7 @@ const INAPP_BUTTON_CLICK = 'INAPP_BUTTON_CLICK';
|
|
|
16
16
|
const TEMP_STORE_PURCHASE = 'TEMP_STORE_PURCHASE';
|
|
17
17
|
const TEMP_STORE_ADDED_TO_CART = 'TEMP_STORE_ADDED_TO_CART';
|
|
18
18
|
const TEMP_STORE_CUSTOM_ACTION = 'TEMP_STORE_CUSTOM_ACTION';
|
|
19
|
+
const FOREGROUND_PUSH = 'FOREGROUND_PUSH';
|
|
19
20
|
|
|
20
21
|
function shouldNotProceed() {
|
|
21
22
|
return Insider == null;
|
|
@@ -369,4 +370,38 @@ export default class RNInsider {
|
|
|
369
370
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
370
371
|
}
|
|
371
372
|
}
|
|
373
|
+
|
|
374
|
+
static signUpConfirmation() {
|
|
375
|
+
if (shouldNotProceed()) return;
|
|
376
|
+
|
|
377
|
+
try {
|
|
378
|
+
Insider.signUpConfirmation();
|
|
379
|
+
} catch (error) {
|
|
380
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
static setForegroundPushCallback (callback) {
|
|
385
|
+
if (shouldNotProceed()) return;
|
|
386
|
+
|
|
387
|
+
try {
|
|
388
|
+
Insider.setForegroundPushCallback();
|
|
389
|
+
|
|
390
|
+
eventHandler.addListener(FOREGROUND_PUSH, notification => {
|
|
391
|
+
callback(notification);
|
|
392
|
+
});
|
|
393
|
+
} catch (error) {
|
|
394
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
static setActiveForegroundPushView() {
|
|
399
|
+
if (shouldNotProceed()) return;
|
|
400
|
+
|
|
401
|
+
try {
|
|
402
|
+
Insider.setActiveForegroundPushView();
|
|
403
|
+
} catch (error) {
|
|
404
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
405
|
+
}
|
|
406
|
+
}
|
|
372
407
|
}
|
|
@@ -276,6 +276,14 @@ RCT_EXPORT_METHOD(setGDPRConsent:(BOOL)gdprConsent) {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
+
RCT_EXPORT_METHOD(signUpConfirmation) {
|
|
280
|
+
@try {
|
|
281
|
+
[Insider signUpConfirmation];
|
|
282
|
+
} @catch (NSException *e){
|
|
283
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
279
287
|
// Insider Product
|
|
280
288
|
RCT_EXPORT_METHOD(itemPurchased:(NSString *)saleID productMustMap:(NSDictionary *)productMustMap productOptMap:(NSDictionary *)productOptMap) {
|
|
281
289
|
@try {
|
|
@@ -492,6 +500,34 @@ RCT_EXPORT_METHOD(enableCarrierCollection:(BOOL)enabled) {
|
|
|
492
500
|
}
|
|
493
501
|
}
|
|
494
502
|
|
|
503
|
+
RCT_EXPORT_METHOD(setForegroundPushCallback) {
|
|
504
|
+
@try {
|
|
505
|
+
[Insider setForegroundPushCallback:@selector(foregroundPushCallback:) sender:self];
|
|
506
|
+
} @catch (NSException *e){
|
|
507
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
RCT_EXPORT_METHOD(setActiveForegroundPushView) {
|
|
512
|
+
@try {
|
|
513
|
+
[Insider setActiveForegroundPushView];
|
|
514
|
+
} @catch (NSException *e){
|
|
515
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
-(void)foregroundPushCallback:(UNNotification *) notification {
|
|
520
|
+
@try {
|
|
521
|
+
if (notification == nil) return;
|
|
522
|
+
|
|
523
|
+
RNNotificationHandler *handler = [[RNNotificationHandler alloc] init];
|
|
524
|
+
|
|
525
|
+
[handler sendDataToJS:@"FOREGROUND_PUSH" data:notification.request.content.userInfo];
|
|
526
|
+
} @catch (NSException *e){
|
|
527
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
495
531
|
-(void)emitEvent:(NSDictionary *)evetData {
|
|
496
532
|
@try {
|
|
497
533
|
RNNotificationHandler *handler = [[RNNotificationHandler alloc] init];
|
package/package.json
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
NEW_RN_VERSION_NAME=$1
|
|
4
|
+
|
|
5
|
+
packagejson_file_path="package.json"
|
|
6
|
+
podspec_file_path="RNInsider.podspec"
|
|
7
|
+
gradle_file_path="android/build.gradle"
|
|
8
|
+
|
|
9
|
+
CURRENT_RN_SDK_VERSION=$(sed -n 3p $packagejson_file_path | cut -d '"' -f 4)
|
|
10
|
+
|
|
11
|
+
CURRENT_iOS_VERSION=$(sed -n 17p $podspec_file_path | awk '{print $3}' | sed 's/^.//;s/.$//')
|
|
12
|
+
CURRENT_iOS_HYBRID_VERSION=$(sed -n 18p $podspec_file_path | awk '{print $3}' | sed 's/^.//;s/.$//')
|
|
13
|
+
|
|
14
|
+
CURRENT_ANDROID_VERSION=$(sed -n 39p $gradle_file_path | awk '{print $2}' | awk -F : '{print $3}' | cut -d "'" -f 1)
|
|
15
|
+
CURRENT_ANDROID_HYBRID_VERSION=$(sed -n 40p $gradle_file_path | awk '{print $2}' | awk -F : '{print $3}' | cut -d "'" -f 1)
|
|
16
|
+
|
|
17
|
+
LATEST_iOS_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/iOS/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $2}')
|
|
18
|
+
LATEST_iOS_HYBRID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/iOSHybrid/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $2}')
|
|
19
|
+
|
|
20
|
+
LATEST_ANDROID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/android/com/useinsider/insider/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $5}' | cut -d "-" -f 1)
|
|
21
|
+
LATEST_ANDROID_HYBRID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/android/com/useinsider/insiderhybrid/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $5}')
|
|
22
|
+
|
|
23
|
+
# Set new version in package.json
|
|
24
|
+
sed -i "s/$CURRENT_RN_SDK_VERSION/$NEW_RN_VERSION_NAME/" $packagejson_file_path
|
|
25
|
+
|
|
26
|
+
# Set new version in podspec
|
|
27
|
+
sed -i "s/$CURRENT_iOS_VERSION/$LATEST_iOS_VERSION/;s/$CURRENT_iOS_HYBRID_VERSION/$LATEST_iOS_HYBRID_VERSION/" $podspec_file_path
|
|
28
|
+
|
|
29
|
+
# Set new version in build.gradle
|
|
30
|
+
sed -i "s/$CURRENT_ANDROID_VERSION/$LATEST_ANDROID_VERSION/;s/$CURRENT_ANDROID_HYBRID_VERSION/$LATEST_ANDROID_HYBRID_VERSION/" $gradle_file_path
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
SLACK_ENDPOINT="https://mobile.useinsider.com/api/lilith/slack_notifier"
|
|
3
|
+
|
|
4
|
+
CHANNEL=$1
|
|
5
|
+
USERNAME=$2
|
|
6
|
+
TEXT="$3"
|
|
7
|
+
|
|
8
|
+
generate_post_data()
|
|
9
|
+
{
|
|
10
|
+
cat <<EOF
|
|
11
|
+
{
|
|
12
|
+
"auth_key": "$SLACK_NOTIFIER_AUTH_KEY",
|
|
13
|
+
"channel": "$CHANNEL",
|
|
14
|
+
"message": "$TEXT",
|
|
15
|
+
"username": "$USERNAME"
|
|
16
|
+
}
|
|
17
|
+
EOF
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
curl -i -H "Content-Type:application/json" -X POST --data "$(generate_post_data)" $SLACK_ENDPOINT >/dev/null 2>&1
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
name: NPM Publish
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- "*"
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
release:
|
|
10
|
-
name: Create Release
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- name: Checkout code
|
|
15
|
-
uses: actions/checkout@v3
|
|
16
|
-
with:
|
|
17
|
-
ref: develop
|
|
18
|
-
|
|
19
|
-
- name: Set release name
|
|
20
|
-
run: echo "RELEASE_NAME=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
|
|
21
|
-
|
|
22
|
-
- name: Create release
|
|
23
|
-
id: create_release
|
|
24
|
-
uses: actions/create-release@v1
|
|
25
|
-
env:
|
|
26
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
27
|
-
with:
|
|
28
|
-
tag_name: ${{ github.ref }}
|
|
29
|
-
release_name: ${{ env.RELEASE_NAME }}
|
|
30
|
-
body_path: changelog/${{ env.RELEASE_NAME }}.md
|
|
31
|
-
draft: false
|
|
32
|
-
prerelease: false
|
|
33
|
-
build:
|
|
34
|
-
runs-on: ubuntu-latest
|
|
35
|
-
steps:
|
|
36
|
-
- uses: actions/checkout@v3
|
|
37
|
-
- uses: actions/setup-node@v3.1.0
|
|
38
|
-
with:
|
|
39
|
-
node-version: 12
|
|
40
|
-
- run: npm ci
|
|
41
|
-
- run: npm test
|
|
42
|
-
|
|
43
|
-
publish-npm:
|
|
44
|
-
needs: build
|
|
45
|
-
runs-on: ubuntu-latest
|
|
46
|
-
steps:
|
|
47
|
-
- uses: actions/checkout@v3
|
|
48
|
-
- uses: actions/setup-node@v3.1.0
|
|
49
|
-
with:
|
|
50
|
-
node-version: 12
|
|
51
|
-
registry-url: https://registry.npmjs.org/
|
|
52
|
-
- run: npm ci
|
|
53
|
-
- run: npm publish
|
|
54
|
-
env:
|
|
55
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
56
|
-
- run: |
|
|
57
|
-
text=":atom_symbol: A new version of React Native SDK is published."
|
|
58
|
-
object='{"text": "'"$text"'"}'
|
|
59
|
-
curl -X POST -H 'Content-type: application/json' --data "$object" https://hooks.slack.com/services/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
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
name: NPM Publish
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
repository_dispatch:
|
|
5
|
-
types: sdk-deploy
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
release:
|
|
9
|
-
name: Create Release
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout code
|
|
14
|
-
uses: actions/checkout@v3
|
|
15
|
-
with:
|
|
16
|
-
ref: develop
|
|
17
|
-
|
|
18
|
-
- name: Set release name
|
|
19
|
-
run: echo "RELEASE_NAME=${{ github.event.client_payload.sdk_version }}" >> $GITHUB_ENV
|
|
20
|
-
|
|
21
|
-
- name: Create release
|
|
22
|
-
id: create_release
|
|
23
|
-
uses: actions/create-release@v1
|
|
24
|
-
env:
|
|
25
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
26
|
-
with:
|
|
27
|
-
tag_name: ${{ github.event.client_payload.sdk_version }}
|
|
28
|
-
release_name: ${{ env.RELEASE_NAME }}
|
|
29
|
-
body: ${{ github.event.client_payload.description }}
|
|
30
|
-
draft: false
|
|
31
|
-
prerelease: false
|
|
32
|
-
build:
|
|
33
|
-
runs-on: ubuntu-latest
|
|
34
|
-
steps:
|
|
35
|
-
- uses: actions/checkout@v3
|
|
36
|
-
- uses: actions/setup-node@v3.1.0
|
|
37
|
-
with:
|
|
38
|
-
node-version: 12
|
|
39
|
-
- run: npm ci
|
|
40
|
-
- run: npm test
|
|
41
|
-
|
|
42
|
-
publish-npm:
|
|
43
|
-
needs: build
|
|
44
|
-
runs-on: ubuntu-latest
|
|
45
|
-
steps:
|
|
46
|
-
- uses: actions/checkout@v3
|
|
47
|
-
- uses: actions/setup-node@v3.1.0
|
|
48
|
-
with:
|
|
49
|
-
node-version: 12
|
|
50
|
-
registry-url: https://registry.npmjs.org/
|
|
51
|
-
- run: npm ci
|
|
52
|
-
- run: npm publish
|
|
53
|
-
env:
|
|
54
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
55
|
-
- run: |
|
|
56
|
-
text=":atom_symbol: A new version of React Native SDK is published."
|
|
57
|
-
object='{"text": "'"$text"'"}'
|
|
58
|
-
curl -X POST -H 'Content-type: application/json' --data "$object" https://hooks.slack.com/services/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
|