Feat/testflight (#24)

* feat: deploy app to testflight

* test gh action

* test gh action

* test gh action

* test gh action

* test gh action

* test gh action

* test gh action

* distribute external

* distribute external

* add changelog

* bump version

* bump version

* bump version

* fix actions

* update action
This commit is contained in:
Salvatore Giordano
2021-03-15 15:10:06 +01:00
committed by GitHub
parent 556a51e8be
commit 4649b4c1a7
7 changed files with 114 additions and 12 deletions
+28 -2
View File
@@ -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:
+45 -2
View File
@@ -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
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
@@ -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
----
@@ -8,8 +8,6 @@
<dict>
<key>io.getstream.flutter</key>
<string>match AdHoc io.getstream.flutter</string>
<key>io.getstream.flutter.Notifications</key>
<string>match AdHoc io.getstream.flutter.Notifications</string>
</dict>
</dict>
</plist>
@@ -5,27 +5,39 @@
<testcase classname="fastlane.lanes" name="0: Verifying fastlane version" time="0.000371">
<testcase classname="fastlane.lanes" name="0: Verifying fastlane version" time="0.000404">
</testcase>
<testcase classname="fastlane.lanes" name="1: default_platform" time="0.000177">
<testcase classname="fastlane.lanes" name="1: default_platform" time="0.000191">
</testcase>
<testcase classname="fastlane.lanes" name="2: is_ci" time="0.000187">
<testcase classname="fastlane.lanes" name="2: is_ci" time="0.000194">
</testcase>
<testcase classname="fastlane.lanes" name="3: is_ci" time="0.000166">
<testcase classname="fastlane.lanes" name="3: Switch to ios match_appstore lane" time="0.000191">
</testcase>
<testcase classname="fastlane.lanes" name="4: match" time="36.640008">
<testcase classname="fastlane.lanes" name="4: is_ci" time="0.000169">
</testcase>
<testcase classname="fastlane.lanes" name="5: match" time="4.754179">
</testcase>
<testcase classname="fastlane.lanes" name="6: gym" time="17.780547">
<failure message="/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/actions/actions_helper.rb:67:in `execute_action'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'&#10;Fastfile:68:in `block (2 levels) in parsing_binding'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/lane.rb:33:in `call'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/runner.rb:45:in `execute'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'&#10;/Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'&#10;/Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'&#10;/Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'&#10;/Library/Ruby/Gems/2.6.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/commands_generator.rb:352:in `run'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'&#10;/Library/Ruby/Gems/2.6.0/gems/fastlane-2.171.0/bin/fastlane:23:in `&lt;top (required)&gt;'&#10;/usr/local/bin/fastlane:23:in `load'&#10;/usr/local/bin/fastlane:23:in `&lt;main&gt;'&#10;&#10;Error building the application - see the log above" />
</testcase>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>iCloudContainerEnvironment</key>
<string>Production</string>
<key>provisioningProfiles</key>
<dict>
<key>io.getstream.flutter</key>
<string>match AppStore io.getstream.flutter</string>
</dict>
</dict>
</plist>
+1 -1
View File
@@ -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"