Skip to content

Commit a586528

Browse files
[CI] Implement Testflight Workflow (#631)
1 parent 4f6ed70 commit a586528

File tree

6 files changed

+80
-12
lines changed

6 files changed

+80
-12
lines changed

.github/workflows/testflight.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Test Flight Deploy DemoApp
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'main'
7+
8+
release:
9+
types: [published]
10+
11+
workflow_dispatch:
12+
13+
env:
14+
HOMEBREW_NO_INSTALL_CLEANUP: 1
15+
16+
jobs:
17+
deploy:
18+
runs-on: macos-14
19+
steps:
20+
- name: Connect Bot
21+
uses: webfactory/[email protected]
22+
with:
23+
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
24+
- uses: actions/[email protected]
25+
with:
26+
fetch-depth: 0
27+
- uses: ./.github/actions/ruby-cache
28+
- uses: ./.github/actions/xcode-cache
29+
- name: Deploy Demo app
30+
env:
31+
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
32+
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
GITHUB_PR_NUM: ${{ github.event.number }}
35+
run: bundle exec fastlane swiftui_testflight_build
36+
- uses: 8398a7/action-slack@v3
37+
with:
38+
status: ${{ job.status }}
39+
text: "You shall not pass!"
40+
fields: message,commit,author,action,workflow,job,took
41+
env:
42+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
43+
MATRIX_CONTEXT: ${{ toJson(matrix) }}
44+
if: failure()

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ GEM
200200
fastlane
201201
pry
202202
fastlane-plugin-sonarcloud_metric_kit (0.2.1)
203-
fastlane-plugin-stream_actions (0.3.70)
203+
fastlane-plugin-stream_actions (0.3.71)
204204
xctest_list (= 1.2.1)
205205
fastlane-plugin-versioning (0.6.0)
206206
ffi (1.17.0)
@@ -427,7 +427,7 @@ DEPENDENCIES
427427
fastlane-plugin-create_xcframework
428428
fastlane-plugin-lizard
429429
fastlane-plugin-sonarcloud_metric_kit
430-
fastlane-plugin-stream_actions (= 0.3.70)
430+
fastlane-plugin-stream_actions (= 0.3.71)
431431
fastlane-plugin-versioning
432432
jazzy
433433
json

StreamChatSwiftUI.xcodeproj/project.pbxproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3185,7 +3185,7 @@
31853185
"@executable_path/Frameworks",
31863186
"@loader_path/Frameworks",
31873187
);
3188-
MARKETING_VERSION = 4.8.0;
3188+
MARKETING_VERSION = 1.0;
31893189
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.StreamChatSwiftUI;
31903190
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
31913191
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3230,7 +3230,7 @@
32303230
CODE_SIGN_ENTITLEMENTS = DemoAppSwiftUI/DemoAppSwiftUI.entitlements;
32313231
CODE_SIGN_IDENTITY = "Apple Development";
32323232
CODE_SIGN_STYLE = Automatic;
3233-
CURRENT_PROJECT_VERSION = 57;
3233+
CURRENT_PROJECT_VERSION = 1;
32343234
DEVELOPMENT_ASSET_PATHS = "\"DemoAppSwiftUI/Preview Content\"";
32353235
DEVELOPMENT_TEAM = EHV7XZLAHA;
32363236
ENABLE_PREVIEWS = YES;
@@ -3246,7 +3246,7 @@
32463246
"$(inherited)",
32473247
"@executable_path/Frameworks",
32483248
);
3249-
MARKETING_VERSION = 4.57.0;
3249+
MARKETING_VERSION = 1.0;
32503250
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.DemoAppSwiftUI;
32513251
PRODUCT_NAME = "$(TARGET_NAME)";
32523252
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3562,7 +3562,7 @@
35623562
"@executable_path/Frameworks",
35633563
"@loader_path/Frameworks",
35643564
);
3565-
MARKETING_VERSION = 4.8.0;
3565+
MARKETING_VERSION = 1.0;
35663566
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.StreamChatSwiftUI;
35673567
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
35683568
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3596,7 +3596,7 @@
35963596
"@executable_path/Frameworks",
35973597
"@loader_path/Frameworks",
35983598
);
3599-
MARKETING_VERSION = 4.8.0;
3599+
MARKETING_VERSION = 1.0;
36003600
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.StreamChatSwiftUI;
36013601
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
36023602
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3666,7 +3666,7 @@
36663666
CODE_SIGN_ENTITLEMENTS = DemoAppSwiftUI/DemoAppSwiftUI.entitlements;
36673667
CODE_SIGN_IDENTITY = "Apple Development";
36683668
CODE_SIGN_STYLE = Automatic;
3669-
CURRENT_PROJECT_VERSION = 57;
3669+
CURRENT_PROJECT_VERSION = 1;
36703670
DEVELOPMENT_ASSET_PATHS = "\"DemoAppSwiftUI/Preview Content\"";
36713671
DEVELOPMENT_TEAM = EHV7XZLAHA;
36723672
ENABLE_PREVIEWS = YES;
@@ -3681,7 +3681,7 @@
36813681
"$(inherited)",
36823682
"@executable_path/Frameworks",
36833683
);
3684-
MARKETING_VERSION = 4.57.0;
3684+
MARKETING_VERSION = 1.0;
36853685
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.DemoAppSwiftUI;
36863686
PRODUCT_NAME = "$(TARGET_NAME)";
36873687
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3700,7 +3700,7 @@
37003700
CODE_SIGN_ENTITLEMENTS = DemoAppSwiftUI/DemoAppSwiftUI.entitlements;
37013701
CODE_SIGN_IDENTITY = "Apple Distribution";
37023702
CODE_SIGN_STYLE = Manual;
3703-
CURRENT_PROJECT_VERSION = 57;
3703+
CURRENT_PROJECT_VERSION = 1;
37043704
DEVELOPMENT_ASSET_PATHS = "\"DemoAppSwiftUI/Preview Content\"";
37053705
DEVELOPMENT_TEAM = EHV7XZLAHA;
37063706
ENABLE_PREVIEWS = YES;
@@ -3716,7 +3716,7 @@
37163716
"$(inherited)",
37173717
"@executable_path/Frameworks",
37183718
);
3719-
MARKETING_VERSION = 4.57.0;
3719+
MARKETING_VERSION = 1.0;
37203720
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.DemoAppSwiftUI;
37213721
PRODUCT_NAME = "$(TARGET_NAME)";
37223722
PROVISIONING_PROFILE_SPECIFIER = "match AppStore io.getstream.iOS.DemoAppSwiftUI";

fastlane/Fastfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,19 @@ lane :match_me do |options|
162162
)
163163
end
164164

165+
desc 'Builds the latest version of Demo app and uploads it to TestFlight'
166+
lane :swiftui_testflight_build do
167+
match_me
168+
testflight_build(
169+
api_key: appstore_api_key,
170+
xcode_project: xcode_project,
171+
sdk_target: 'StreamChatSwiftUI',
172+
app_target: 'DemoAppSwiftUI',
173+
app_identifier: 'io.getstream.iOS.DemoAppSwiftUI',
174+
app_version: last_git_tag
175+
)
176+
end
177+
165178
desc 'Runs tests in Debug config'
166179
lane :test_ui do |options|
167180
next unless is_check_required(sources: sources_matrix[:ui], force_check: @force_check)

fastlane/Pluginfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
gem 'fastlane-plugin-versioning'
66
gem 'fastlane-plugin-sonarcloud_metric_kit'
77
gem 'fastlane-plugin-create_xcframework'
8-
gem 'fastlane-plugin-stream_actions', '0.3.70'
8+
gem 'fastlane-plugin-stream_actions', '0.3.71'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>provisioningProfiles</key>
6+
<dict>
7+
<key>io.getstream.iOS.DemoAppSwiftUI</key>
8+
<string>match AppStore io.getstream.iOS.DemoAppSwiftUI</string>
9+
</dict>
10+
</dict>
11+
</plist>

0 commit comments

Comments
 (0)