Skip to content

Commit aba313b

Browse files
authored
chore: make sample app distribution check run on every PR (#2086)
* Revert "chore: sample-distribution.yml update (#2074)" This reverts commit 351e9f8. * Revert "Update sample-distribution.yml (#2075)" This reverts commit 21c0ce5. * chore: enable sample app deployment check on all branches * chore: enable workflow to run on push * chore: revert to old token
1 parent 42ef294 commit aba313b

File tree

3 files changed

+28
-25
lines changed

3 files changed

+28
-25
lines changed

.github/workflows/sample-distribution.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
name: sample-distribution
22

3-
on:
4-
push:
5-
branches:
6-
- develop
7-
83
concurrency:
9-
group: sample-distribution
4+
group: sample-distribution-${{ github.ref }}
105
cancel-in-progress: true
116

7+
on:
8+
push:
9+
paths:
10+
- '.github/workflows/sample-distribution.yml'
11+
- 'package/**'
12+
- 'packages/examples/SampleApp/**'
13+
1214
jobs:
1315
build_and_deploy_ios_testflight_qa:
14-
runs-on: macos-12
16+
name: Build SampleApp iOS and Deploy-${{ github.ref == 'refs/heads/develop' }}
17+
runs-on: [macos-12]
1518
steps:
16-
- name: Install Bot SSH Key
17-
uses: webfactory/[email protected]
18-
with:
19-
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
2019
- uses: actions/checkout@v2
2120
with:
2221
token: ${{ secrets.DOCUSAURUS_GH_TOKEN }}
@@ -46,14 +45,16 @@ jobs:
4645
- name: Build and release Testflight QA
4746
env:
4847
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
48+
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
4949
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
5050
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
5151
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
5252
run: |
5353
cd examples/SampleApp
54-
bundle exec fastlane deploy_to_testflight_qa
54+
bundle exec fastlane deploy_to_testflight_qa deploy:${{ github.ref == 'refs/heads/develop' }};
5555
5656
build_and_deploy_android_s3:
57+
name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }}
5758
runs-on: ubuntu-latest
5859
steps:
5960
- uses: actions/checkout@v2
@@ -75,11 +76,13 @@ jobs:
7576
7677
- name: Configure AWS credentials
7778
uses: aws-actions/configure-aws-credentials@v1
79+
if: ${{ github.ref == 'refs/heads/develop' }}
7880
with:
7981
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
8082
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
8183
aws-region: us-east-1
8284
- name: Upload APK
85+
if: ${{ github.ref == 'refs/heads/develop' }}
8386
# https://getstream.io/downloads/rn-sample-app.apk
8487
run: |
8588
cp examples/SampleApp/android/app/build/outputs/apk/release/app-release.apk rn-sample-app.apk

examples/SampleApp/fastlane/Fastfile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,19 @@ platform :ios do
105105
output_directory: "./dist",
106106
)
107107

108-
begin
109-
upload_to_testflight(
110-
groups: ['Testers'],
111-
changelog: "Lots of amazing new features to test out!",
112-
reject_build_waiting_for_review: false
113-
)
114-
rescue Exception => e
115-
if e.message.include? "Another build is in review"
116-
UI.important("Another build is already in beta review. Skipping beta review submission")
117-
else
118-
raise
108+
if options[:deploy]
109+
begin
110+
upload_to_testflight(
111+
groups: ['Testers'],
112+
changelog: "Lots of amazing new features to test out!",
113+
reject_build_waiting_for_review: false
114+
)
115+
rescue Exception => e
116+
if e.message.include? "Another build is in review"
117+
UI.important("Another build is already in beta review. Skipping beta review submission")
118+
else
119+
raise
120+
end
119121
end
120122
end
121123

examples/SampleApp/fastlane/Matchfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ git_url("https://github.com/GetStream/ios-certificates")
33

44
storage_mode("git")
55

6-
username("[email protected]")
7-
86
team_id("EHV7XZLAHA")
97

108
# app_identifier(["tools.fastlane.app", "tools.fastlane.app2"])

0 commit comments

Comments
 (0)