-
Notifications
You must be signed in to change notification settings - Fork 78
84 lines (71 loc) · 2.19 KB
/
build.yaml
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
on:
workflow_dispatch:
schedule:
- cron: "0 11 * * *"
name: Build dev binaries
env:
FLUTTER_VERSION: 3.22.2
XCODE_VERSION: ^15.0.1
jobs:
build-app:
name: Build app
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- os: android
runner: ubuntu-latest
- os: ios
runner: macos-latest
environment: dev
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: "stable"
cache: true
cache-key: deps-${{ hashFiles('**/pubspec.lock') }} # optional, change this to force refresh cache
cache-path: ${{ runner.tool_cache }}/flutter # optional, change this to specify the cache path
- name: Setup Fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby"
bundler-cache: true
working-directory: ${{ matrix.os }}
- name: Setup Firebase env
env:
FIREBASE_ENV: ${{ secrets.FIREBASE_ENV }}
run: ./scripts/setup-firebase.sh
- name: Setup Java
if: matrix.os == 'android'
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "11"
- name: Select Xcode version
if: matrix.os == 'ios'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Setup iOS environment
if: matrix.os == 'ios'
run: ../scripts/setup-ios.sh
working-directory: ${{ matrix.os }}
- name: Run prebuild
run: ./scripts/prebuild.sh
- name: Build
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APPLE_CERTIFICATES_SSH_KEY: ${{ secrets.APPLE_CERTIFICATES_SSH_KEY }}
run: ../scripts/build-dev.sh
working-directory: ${{ matrix.os }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: tmail-dev-${{ matrix.os }}
path: |
build/app/outputs/flutter-apk/app-debug.apk
ios/Runner.ipa