-
Notifications
You must be signed in to change notification settings - Fork 34
206 lines (178 loc) · 7.05 KB
/
release_apps.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
name: Release Apps
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
branches:
- develop
push:
branches:
- develop
permissions:
checks: write
contents: read
jobs:
release_android_app:
name: Release Android App
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Create Release APK
run: |
cd ./packages/react-native-hms
npm install
cd ../react-native-room-kit
npm install
cd ./example
npm install
cd ./android
chmod +x ./gradlew
./gradlew assembleRelease
- name: Upload artifact to Firebase App Distribution
uses: wzieba/[email protected]
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: internal, External
releaseNotesFile: ./packages/react-native-room-kit/example/ExampleAppChangelog.txt
file: ./packages/react-native-room-kit/example/android/app/build/outputs/apk/release/app-release.apk
- name: Extract Branch Name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Post Slack Notification
uses: rtCamp/[email protected]
env:
SLACK_CHANNEL: dogfooding
SLACK_COLOR: ${{ job.status }}
SLACK_ICON_EMMOJI: ":react:"
SLACK_USERNAME: React Native Bot
SLACK_WEBHOOK: ${{ secrets.SLACK_URL }}
SLACK_TITLE: ":react: 🎉 React Native Android App released! 🎊 :react:"
SLACK_MESSAGE: 📝 Changelog 🔗 https://github.com/100mslive/100ms-react-native/blob/${{ steps.extract_branch.outputs.branch }}/packages/react-native-room-kit/example/ExampleAppChangelog.txt
SLACK_FOOTER: 🤖 Download from Firebase 👉 https://appdistribution.firebase.dev/i/7b7ab3b30e627c35
release_ios_app:
name: Release iOS App
runs-on: macOS-latest
timeout-minutes: 60
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 11
distribution: zulu
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Install Node Modules
run: |
cd ./packages/react-native-hms
npm install
cd ../react-native-room-kit
npm install
cd ./example
npm install
- name: Install Pods
run: |
sudo gem install cocoapods
cd ./packages/react-native-room-kit/example/ios
pod install
- name: Build iOS App for Firebase App Distribution
uses: yukiarrr/[email protected]
with:
project-path: packages/react-native-room-kit/example/ios/RNExample.xcodeproj
p12-base64: ${{ secrets.IOS_P12_BASE64 }}
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
mobileprovision-base64: |
${{ secrets.ADHOC_MOBILEPROVISION_BASE64 }}
${{ secrets.ADHOCEXTENSION_MOBILEPROVISION_BASE64 }}
code-signing-identity: iPhone Distribution
team-id: ${{ secrets.IOS_TEAM_ID }}
workspace-path: packages/react-native-room-kit/example/ios/RNExample.xcworkspace
scheme: RNExample
export-method: ad-hoc
export-options: packages/react-native-room-kit/example/ios/ExportOptions.plist
- name: Publish artifact
uses: actions/upload-artifact@v4
with:
name: ipa
path: output.ipa
- name: Build iOS App for TestFlight
uses: yukiarrr/[email protected]
with:
project-path: packages/react-native-room-kit/example/ios/RNExample.xcodeproj
p12-base64: ${{ secrets.IOS_P12_BASE64 }}
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
mobileprovision-base64: |
${{ secrets.APPSTORE_MOBILEPROVISION_BASE64 }}
${{ secrets.APPSTORE_BROADCAST_MOBILEPROVISION_BASE64 }}
code-signing-identity: iPhone Distribution
team-id: ${{ secrets.IOS_TEAM_ID }}
workspace-path: packages/react-native-room-kit/example/ios/RNExample.xcworkspace
scheme: RNExample
export-options: packages/react-native-room-kit/example/ios/AppStoreExportOptions.plist
output-path: ./packages/output.ipa
- name: Upload app to TestFlight
uses: apple-actions/upload-testflight-build@v1
with:
app-path: ./packages/output.ipa
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
send_ipa_firebase:
name: Send IPA to Firebase
needs: release_ios_app
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download artifact
id: download-artifact
uses: actions/download-artifact@v4
with:
name: ipa
- name: Upload artifact to Firebase App Distribution
uses: wzieba/[email protected]
with:
appId: ${{ secrets.FIREBASE_APP_ID }}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
groups: internal, External
releaseNotesFile: ./packages/react-native-room-kit/example/ExampleAppChangelog.txt
file: ${{ steps.download-artifact.outputs.download-path }}
- name: Extract Branch Name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Post Slack Notification
uses: rtCamp/[email protected]
env:
SLACK_CHANNEL: dogfooding
SLACK_COLOR: ${{ job.status }}
SLACK_ICON_EMMOJI: ":react:"
SLACK_USERNAME: React Native Bot
SLACK_WEBHOOK: ${{ secrets.SLACK_URL }}
SLACK_TITLE: ":react: 🎉 React Native iOS App released! 🎊 :react:"
SLACK_MESSAGE: 📝 Changelog 🔗 https://github.com/100mslive/100ms-react-native/blob/${{ steps.extract_branch.outputs.branch }}/packages/react-native-room-kit/example/ExampleAppChangelog.txt
SLACK_FOOTER: 🍎 Download from Firebase 👉 https://appdistribution.firebase.dev/i/bdfa6517b69c31d6 🍎 Download from TestFlight 👉 https://testflight.apple.com/join/v4bSIPad