diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8da09a6..bfb5d62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,8 +2,8 @@ name: build on: push: - branches: - - main + branches: + - main workflow_dispatch: defaults: run: @@ -16,6 +16,32 @@ jobs: - uses: rokroskar/workflow-run-cleanup-action@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + build_and_deploy_ios: + runs-on: [macos-latest] + steps: + - uses: actions/checkout@v2 + - name: Install RubyGems + run: | + cd ios + bundle install + - uses: subosito/flutter-action@v1.4.0 + with: + channel: 'stable' + - name: Flutter setup + run: | + flutter pub get + - name: Build and release + env: + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} + FASTLANE_USER: ${{ secrets.FASTLANE_USER }} + FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} + FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }} + FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }} + run: | + flutter build ios --release --no-codesign + cd ios + bundle exec fastlane deploy_to_testflight build_and_deploy_android: runs-on: ubuntu-latest steps: diff --git a/packages/stream_chat_v1/ios/fastlane/Fastfile b/packages/stream_chat_v1/ios/fastlane/Fastfile index ec2adc8..4ddcc99 100644 --- a/packages/stream_chat_v1/ios/fastlane/Fastfile +++ b/packages/stream_chat_v1/ios/fastlane/Fastfile @@ -13,13 +13,23 @@ lane :match_me do type: "adhoc", app_identifier: [ "io.getstream.flutter", - "io.getstream.flutter.Notifications" ], readonly: is_ci, force_for_new_devices: true ) end +desc "Installs all Certs and Profiles necessary for appstore" +lane :match_appstore do + match( + type: "appstore", + app_identifier: [ + "io.getstream.flutter", + ], + readonly: is_ci + ) +end + platform :ios do desc "Deploy build to Firebase" lane :deploy_to_firebase do @@ -43,4 +53,37 @@ platform :ios do groups: "ios-stream-testers" ) end -end \ No newline at end of file +end + +platform :ios do + desc "Deploy build to TestFlight" + lane :deploy_to_testflight do + match_appstore + + settings_to_override = { + :BUNDLE_IDENTIFIER => "io.getstream.flutter", + :PROVISIONING_PROFILE_SPECIFIER => "match AppStore io.getstream.flutter" + } + + gym( + workspace: "./Runner.xcworkspace", + scheme: "Runner", + export_method: "app-store", + export_options: "./fastlane/testflight_gym_export_options.plist", + silent: true, + clean: true, + xcargs: settings_to_override, + include_symbols: true, + output_directory: "./dist", + ) + + message = changelog_from_git_commits(commits_count: 10) + + upload_to_testflight( + groups: ['Public'], + distribute_external: true, + changelog: message, + reject_build_waiting_for_review: true + ) + end +end diff --git a/packages/stream_chat_v1/ios/fastlane/README.md b/packages/stream_chat_v1/ios/fastlane/README.md index e464ef2..7658d64 100644 --- a/packages/stream_chat_v1/ios/fastlane/README.md +++ b/packages/stream_chat_v1/ios/fastlane/README.md @@ -20,6 +20,11 @@ or alternatively using `brew install fastlane` fastlane match_me ``` Installs all Certs and Profiles necessary for development and ad-hoc +### match_appstore +``` +fastlane match_appstore +``` +Installs all Certs and Profiles necessary for appstore ---- @@ -29,6 +34,11 @@ Installs all Certs and Profiles necessary for development and ad-hoc fastlane ios deploy_to_firebase ``` Deploy build to Firebase +### ios deploy_to_testflight +``` +fastlane ios deploy_to_testflight +``` +Deploy build to TestFlight ---- diff --git a/packages/stream_chat_v1/ios/fastlane/beta_gym_export_options.plist b/packages/stream_chat_v1/ios/fastlane/beta_gym_export_options.plist index 53c7409..e88559a 100644 --- a/packages/stream_chat_v1/ios/fastlane/beta_gym_export_options.plist +++ b/packages/stream_chat_v1/ios/fastlane/beta_gym_export_options.plist @@ -8,8 +8,6 @@ io.getstream.flutter match AdHoc io.getstream.flutter - io.getstream.flutter.Notifications - match AdHoc io.getstream.flutter.Notifications \ No newline at end of file diff --git a/packages/stream_chat_v1/ios/fastlane/report.xml b/packages/stream_chat_v1/ios/fastlane/report.xml index b6e7bdc..42d2518 100644 --- a/packages/stream_chat_v1/ios/fastlane/report.xml +++ b/packages/stream_chat_v1/ios/fastlane/report.xml @@ -5,27 +5,39 @@ - + - + - + - + - + + + + + + + + + + + + + diff --git a/packages/stream_chat_v1/ios/fastlane/testflight_gym_export_options.plist b/packages/stream_chat_v1/ios/fastlane/testflight_gym_export_options.plist new file mode 100644 index 0000000..2d09042 --- /dev/null +++ b/packages/stream_chat_v1/ios/fastlane/testflight_gym_export_options.plist @@ -0,0 +1,13 @@ + + + + + iCloudContainerEnvironment + Production + provisioningProfiles + + io.getstream.flutter + match AppStore io.getstream.flutter + + + \ No newline at end of file diff --git a/packages/stream_chat_v1/pubspec.yaml b/packages/stream_chat_v1/pubspec.yaml index e975fc3..ba5f058 100644 --- a/packages/stream_chat_v1/pubspec.yaml +++ b/packages/stream_chat_v1/pubspec.yaml @@ -1,7 +1,7 @@ name: example description: A new Flutter project. publish_to: 'none' -version: 1.3.3 +version: 1.3.3+2 environment: sdk: ">=2.2.2 <3.0.0"