forked from shiosyakeyakini-info/miria
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.81 KB
/
build_test_android.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
name: テストビルド(Android)
on: [workflow_dispatch]
jobs:
build_for_iOS:
name: Android用テストビルド
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_FVM_VERSION }}
cache: true
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Cache pubspec dependencies
uses: actions/cache@v4
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
build-pubspec-
- name: Create symbolic link
run: ln -s ${{ env.FLUTTER_ROOT }} $HOME/work/flutter
- name: Flutter pub get
run: flutter pub get
- name: Run flutter test with coverage
run: flutter test --coverage --coverage-path=~/coverage/lcov.info
- name: Create apk file
run: |
echo -n "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode --output ./android/release.keystore
export ANDROID_KEYSTORE_PASSWORD="${{ secrets.ANDROID_KEYSTORE_PASSWORD }}"
export ANDROID_KEY_ALIAS="${{ secrets.ANDROID_KEY_ALIAS }}"
export ANDROID_KEY_PASSWORD="${{ secrets.ANDROID_KEY_PASSWORD }}"
flutter build apk --no-tree-shake-icons --release
mv ./build/app/outputs/flutter-apk/app-release.apk ./build/app/outputs/flutter-apk/miria-$BUMP_VERSION.apk