diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml new file mode 100644 index 00000000..dcdb50d7 --- /dev/null +++ b/.github/workflows/testflight.yml @@ -0,0 +1,44 @@ +name: Test Flight Deploy DemoApp + +on: + pull_request: + branches: + - 'main' + + release: + types: [published] + + workflow_dispatch: + +env: + HOMEBREW_NO_INSTALL_CLEANUP: 1 + +jobs: + deploy: + runs-on: macos-14 + steps: + - name: Connect Bot + uses: webfactory/ssh-agent@v0.7.0 + with: + ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} + - uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 + - uses: ./.github/actions/ruby-cache + - uses: ./.github/actions/xcode-cache + - name: Deploy Demo app + env: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_PR_NUM: ${{ github.event.number }} + run: bundle exec fastlane swiftui_testflight_build + - uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + text: "You shall not pass!" + fields: message,commit,author,action,workflow,job,took + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + MATRIX_CONTEXT: ${{ toJson(matrix) }} + if: failure() diff --git a/Gemfile.lock b/Gemfile.lock index c3396ecf..8c3e2660 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -200,7 +200,7 @@ GEM fastlane pry fastlane-plugin-sonarcloud_metric_kit (0.2.1) - fastlane-plugin-stream_actions (0.3.70) + fastlane-plugin-stream_actions (0.3.71) xctest_list (= 1.2.1) fastlane-plugin-versioning (0.6.0) ffi (1.17.0) @@ -427,7 +427,7 @@ DEPENDENCIES fastlane-plugin-create_xcframework fastlane-plugin-lizard fastlane-plugin-sonarcloud_metric_kit - fastlane-plugin-stream_actions (= 0.3.70) + fastlane-plugin-stream_actions (= 0.3.71) fastlane-plugin-versioning jazzy json diff --git a/StreamChatSwiftUI.xcodeproj/project.pbxproj b/StreamChatSwiftUI.xcodeproj/project.pbxproj index 353c0916..a8307d90 100644 --- a/StreamChatSwiftUI.xcodeproj/project.pbxproj +++ b/StreamChatSwiftUI.xcodeproj/project.pbxproj @@ -3185,7 +3185,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 4.8.0; + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.StreamChatSwiftUI; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3230,7 +3230,7 @@ CODE_SIGN_ENTITLEMENTS = DemoAppSwiftUI/DemoAppSwiftUI.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 57; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"DemoAppSwiftUI/Preview Content\""; DEVELOPMENT_TEAM = EHV7XZLAHA; ENABLE_PREVIEWS = YES; @@ -3246,7 +3246,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.57.0; + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.DemoAppSwiftUI; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3562,7 +3562,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 4.8.0; + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.StreamChatSwiftUI; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3596,7 +3596,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 4.8.0; + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.StreamChatSwiftUI; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3666,7 +3666,7 @@ CODE_SIGN_ENTITLEMENTS = DemoAppSwiftUI/DemoAppSwiftUI.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 57; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"DemoAppSwiftUI/Preview Content\""; DEVELOPMENT_TEAM = EHV7XZLAHA; ENABLE_PREVIEWS = YES; @@ -3681,7 +3681,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.57.0; + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.DemoAppSwiftUI; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3700,7 +3700,7 @@ CODE_SIGN_ENTITLEMENTS = DemoAppSwiftUI/DemoAppSwiftUI.entitlements; CODE_SIGN_IDENTITY = "Apple Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 57; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"DemoAppSwiftUI/Preview Content\""; DEVELOPMENT_TEAM = EHV7XZLAHA; ENABLE_PREVIEWS = YES; @@ -3716,7 +3716,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 4.57.0; + MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = io.getstream.iOS.DemoAppSwiftUI; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "match AppStore io.getstream.iOS.DemoAppSwiftUI"; diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 240212be..187cc426 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -162,6 +162,19 @@ lane :match_me do |options| ) end +desc 'Builds the latest version of Demo app and uploads it to TestFlight' +lane :swiftui_testflight_build do + match_me + testflight_build( + api_key: appstore_api_key, + xcode_project: xcode_project, + sdk_target: 'StreamChatSwiftUI', + app_target: 'DemoAppSwiftUI', + app_identifier: 'io.getstream.iOS.DemoAppSwiftUI', + app_version: last_git_tag + ) +end + desc 'Runs tests in Debug config' lane :test_ui do |options| next unless is_check_required(sources: sources_matrix[:ui], force_check: @force_check) diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile index 3d5398c7..98410b08 100644 --- a/fastlane/Pluginfile +++ b/fastlane/Pluginfile @@ -5,4 +5,4 @@ gem 'fastlane-plugin-versioning' gem 'fastlane-plugin-sonarcloud_metric_kit' gem 'fastlane-plugin-create_xcframework' -gem 'fastlane-plugin-stream_actions', '0.3.70' +gem 'fastlane-plugin-stream_actions', '0.3.71' diff --git a/fastlane/testflight_export_options.plist b/fastlane/testflight_export_options.plist new file mode 100644 index 00000000..faa64f5c --- /dev/null +++ b/fastlane/testflight_export_options.plist @@ -0,0 +1,11 @@ + + + + + provisioningProfiles + + io.getstream.iOS.DemoAppSwiftUI + match AppStore io.getstream.iOS.DemoAppSwiftUI + + +