-
Notifications
You must be signed in to change notification settings - Fork 5
141 lines (111 loc) · 3.91 KB
/
flutter_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: Flutter build
on:
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
buildAndTestAndroid:
name: Build beta sideload
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Ninja
uses: lukka/get-cmake@5f6e04f5267c8133f1273bf2103583fc72c46b17
with:
cmakeVersion: "~3.18.0"
# ninjaVersion: "^1.11.1"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
check-latest: false
- name: Load Flutter config
uses: kuhnroyal/flutter-fvm-config-action@v2
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
- name: Flutter version
run: flutter --version
- name: Cache pub dependencies
uses: actions/cache@v4
with:
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- name: Download pub dependencies
run: flutter pub get
# - name: Run build_runner
# run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Run analyzer
run: flutter analyze
- name: Run tests
run: flutter test
- name: Download Android keystore beta
id: android_keystore_beta
uses: timheuer/base64-to-file@v1.2
with:
fileDir: /home/runner/
fileName: keystore-kv-beta.pfx
encodedString: ${{ secrets.ANDROID_KEYSTORE_BETA_BASE64 }}
- name: Build Android App Bundle
env:
KEEVAULT_ANDROID_BETA_KEYSTORE_PASSWORD: ${{ secrets.KEEVAULT_ANDROID_BETA_KEYSTORE_PASSWORD }}
run: flutter build appbundle --dart-define KEEVAULT_STAGE=beta --dart-define KEEVAULT_CHANNEL=sideload
BuildAndTestIos:
name: Build ios prod
runs-on: macos-15
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Load Flutter config
uses: kuhnroyal/flutter-fvm-config-action@v2
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
- name: Flutter version
run: flutter --version
- name: Cache pub dependencies
uses: actions/cache@v4
with:
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- name: Download pub dependencies
run: flutter pub get
- name: Run analyzer
run: flutter analyze
- name: Run tests
run: flutter test
- name: Choose xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'
- name: Build iOS Flutter App
run: flutter build ios --config-only --release --no-codesign --dart-define KEEVAULT_STAGE=prod --dart-define KEEVAULT_NAME_SUFFIX= --dart-define KEEVAULT_ID_SUFFIX= --dart-define IAP_APPLE_APP_STORE=yes
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler: 2.5.17
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Build iOS App bundle
env:
MATCH_GIT_BASIC_AUTHORIZATION: '${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}'
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}'
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}'
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}'
run: |
cd ios
bundle exec fastlane prod_build_only