Skip to content

Commit 7cbd906

Browse files
committed
test ios
1 parent a811081 commit 7cbd906

File tree

3 files changed

+59
-12
lines changed

3 files changed

+59
-12
lines changed

.github/workflows/build_nightly.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ jobs:
6767
echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ${{ github.workspace }}/sample_app/ios/firebase-service-account.json
6868
6969
- name: Build and release
70+
working-directory: sample_app/ios
7071
env:
7172
GOOGLE_APPLICATION_CREDENTIALS: "${{ github.workspace }}/sample_app/ios/firebase-service-account.json"
7273
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
7374
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
7475
run: |
75-
flutter build ios --no-codesign
76-
cd ios
7776
bundle exec fastlane deploy_to_firebase
7877
7978
build_and_deploy_android:
8079
runs-on: ubuntu-latest
8180
timeout-minutes: 15
82-
if: ${{ github.event_name == 'push' || inputs.build_android == true }}
81+
# if: ${{ github.event_name == 'push' || inputs.build_android == true }}
82+
if: false
8383
steps:
8484
- name: Install Bot SSH Key
8585
uses: webfactory/[email protected]

sample_app/Fastfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
opt_out_usage
2+
3+
# Have an easy way to get the root of the project
4+
def root_path
5+
Dir.pwd.sub(/.*\Kfastlane/, '').sub(/.*\Kandroid/, '').sub(/.*\Kios/, '').sub(/.*\K\/\//, '')
6+
end
7+
8+
# Have an easy way to run flutter tasks on the root of the project
9+
lane :sh_on_root do |options|
10+
Dir.chdir(root_path) { sh(options[:command]) }
11+
end
12+
13+
# Tasks to be reused on each platform flow
14+
lane :fetch_dependencies do
15+
sh_on_root(command: "flutter pub get --suppress-analytics")
16+
end
17+
18+
# Tasks to be reused on each platform flow
19+
lane :build_autogenerated_code do
20+
sh_on_root(command: "flutter pub run build_runner build --delete-conflicting-outputs")
21+
end
22+
23+
# Tasks to be reused on each platform flow
24+
lane :lint do
25+
sh_on_root(command: "flutter format --suppress-analytics --set-exit-if-changed -n lib/main.dart lib/src/ test/")
26+
end
27+
28+
# Tasks to be reused on each platform flow
29+
lane :test do |options|
30+
sh_on_root(command: "flutter test --no-pub --coverage --suppress-analytics")
31+
end

sample_app/ios/fastlane/Fastfile

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
fastlane_version "2.226.0"
22
default_platform :ios
33

4+
import '../../Fastfile'
5+
46
before_all do
57
if is_ci
68
setup_ci()
@@ -20,6 +22,18 @@ lane :match_me do
2022
)
2123
end
2224

25+
lane :build do |options|
26+
fetch_dependencies
27+
28+
sign_enabled = options[:sign_enabled] || false
29+
sign_param = sign_enabled ? '' : '--no-codesign'
30+
31+
config_only = options[:config_only] || false
32+
config_param = config_only ? '--config-only' : ''
33+
34+
sh_on_root(command: "flutter build ios --no-pub --suppress-analytics --release #{sign_param} #{config_param}")
35+
end
36+
2337
desc "Installs all Certs and Profiles necessary for appstore"
2438
lane :match_appstore do
2539
match(
@@ -35,15 +49,17 @@ end
3549
lane :deploy_to_firebase do
3650
match_me
3751

38-
gym(
39-
workspace: "./Runner.xcworkspace",
40-
scheme: "Runner",
41-
export_method: "ad-hoc",
42-
export_options: "./fastlane/beta_gym_export_options.plist",
43-
silent: true,
44-
clean: true,
45-
include_symbols: true,
46-
output_directory: "./dist"
52+
build(
53+
sign_enabled: true,
54+
)
55+
56+
build_app(
57+
scheme: "Runner",
58+
export_method: "ad-hoc",
59+
silent: true,
60+
clean: true,
61+
include_symbols: true,
62+
output_directory: './dist',
4763
)
4864

4965
message = changelog_from_git_commits(commits_count: 10)

0 commit comments

Comments
 (0)