-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
40 lines (39 loc) · 1.04 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
# .travis.yml 文件
# 声明构建语言环境
language: android
android: # 配置信息
components:
# 你可能需要修改下面两项的版本
- build-tools-29.0.3
- android-26
# Android Support Repository
- extra-android-m2repository
# Support Library
- extra-android-support
before_script:
- chmod +x gradlew
- chmod +x .travis/build.sh
script:
# 生成 APK
- ./gradlew assembleRelease
- .travis/build.sh
# 部署
deploy:
# 部署到GitHub Release。
# 除此之外,Travis CI还支持发布到fir.im、AWS、Google App Engine等
provider: releases
# Github oauth token
api_key: $GIT_TOKEN
# 部署文件路径;对于Android就部署生成的 apk 文件
file:
- "app/build/outputs/apk/release/PlayVideo*.apk"
- "ApkInfo.json"
file_glob: true
# 发布时机
on:
# tags设置为true表示只有在有tag的情况下才部署
tags: true
repo: Haleydu/playVideo
all_branches: true
# 避免 Travis CI在部署之前清空生成的APK文件
skip_cleanup: 'true'