-
Notifications
You must be signed in to change notification settings - Fork 7
111 lines (97 loc) · 4.13 KB
/
bump-native-sdks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Bump Native SDK version numbers whenever a repository dispatch of a new
# release is received
name: Bump Native SDKs
on:
repository_dispatch:
types: ['ios-sdk-release', 'android-sdk-release']
jobs:
update_android_sdk_version:
runs-on: ubuntu-latest
if: github.event.client_payload.platform == 'android'
steps:
- name: Event Information
run: echo ${{ github.event.client_payload.release }}
# checkout the repo
- uses: actions/checkout@v2
# copy the template file to its final destination
- name: Copy android/build.gradle template file
uses: canastro/copy-action@master
with:
source: 'android/build.gradle.template'
target: 'android/build.gradle'
# render the template using the input sdk version
- name: Render radar-sdk-android release version onto build.gradle
uses: jayamanikharyono/jinja-action@v0.1
with:
data: version=${{ github.event.client_payload.release }}
path: 'android/build.gradle'
# copy the template file to its final destination
- name: Copy example/android/app/build.gradle template file
uses: canastro/copy-action@master
with:
source: 'example/android/app/build.gradle.template'
target: 'example/android/app/build.gradle'
# render the template using the input sdk version
- name: Render radar-sdk-android release version onto example app's build.gradle
uses: jayamanikharyono/jinja-action@v0.1
with:
data: version=${{ github.event.client_payload.release }}
path: 'example/android/app/build.gradle'
# copy the pubspec.yaml template to its final destination
- name: Copy the pubspec.yml template
uses: canastro/copy-action@master
with:
source: 'pubspec.yaml.template'
target: 'pubspec.yaml'
# render the pubspec.yaml template with the sdk version
- name: Render radar-sdk-android release version onto pubspec.yaml
uses: jayamanikharyono/jinja-action@v0.1
with:
data: version=${{ github.event.client_payload.release }}
path: 'pubspec.yaml'
# open a pull request with the new sdk version
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: Automated radar-sdk-android version bump to ${{ github.event.client_payload.release }}
reviewers: radarlabs/eng
token: ${{ secrets.GITHUB_TOKEN }}
update_ios_sdk_version:
runs-on: ubuntu-latest
if: github.event.client_payload.platform == 'ios'
steps:
- name: Event Information
run: echo ${{ github.event.client_payload.release }}
# checkout the repo
- uses: actions/checkout@v2
# copy the podspec template to its final destination
- name: Copy the podspec template
uses: canastro/copy-action@master
with:
source: 'ios/flutter_radar.podspec.template'
target: 'ios/flutter_radar.podspec'
# render the podspec template with the sdk version
- name: Render radar-sdk-ios release version onto podspec template
uses: jayamanikharyono/jinja-action@v0.1
with:
data: version=${{ github.event.client_payload.release }}
path: 'ios/flutter_radar.podspec'
# copy the pubspec.yaml template to its final destination
- name: Copy the podspec template
uses: canastro/copy-action@master
with:
source: 'pubspec.yaml.template'
target: 'pubspec.yaml'
# render the pubspec.yaml template with the sdk version
- name: Render radar-sdk-ios release version onto podspec template
uses: jayamanikharyono/jinja-action@v0.1
with:
data: version=${{ github.event.client_payload.release }}
path: 'pubspec.yaml'
# open a pull request with the new sdk version
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: Automated radar-sdk-ios version bump to ${{ github.event.client_payload.release }}
reviewers: radarlabs/eng
token: ${{ secrets.GITHUB_TOKEN }}