-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy path.travis.yml
56 lines (54 loc) · 1.52 KB
/
.travis.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
matrix:
include:
# 声明 Android 运行环境
- os: linux
language: android
dist: trusty
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
# 声明需要安装的 Android 组件
android:
components:
- tools
- platform-tools
- build-tools-28.0.3
- android-28
- sys-img-armeabi-v7a-google_apis-28
- extra-android-m2repository
- extra-google-m2repository
- extra-google-android-support
jdk: oraclejdk8
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++6
- fonts-droid
# 确保 sdkmanager 是最新的
before_script:
- yes | sdkmanager --update
script:
- yes | flutter doctor --android-licenses
- flutter doctor && flutter -v build apk
# 声明部署的策略,即上传 apk 至 github release
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file:
- build/app/outputs/apk/release/app-release.apk
skip_cleanup: true
on:
tags: true
# 声明 iOS 的运行环境
- os: osx
language: objective-c
osx_image: xcode12.4
script:
- flutter doctor && flutter -v build ios --no-codesign
install:
- git clone -b 2.2.1 https://github.com/flutter/flutter.git
- export PATH="$PATH:`pwd`/flutter/bin"