2019-07-18 10:17:02 +08:00
|
|
|
|
language: cpp
|
|
|
|
|
sudo: required
|
|
|
|
|
compiler: gcc
|
|
|
|
|
group: deprecated-2019Q1
|
|
|
|
|
matrix:
|
|
|
|
|
include:
|
|
|
|
|
- os: linux
|
|
|
|
|
dist: xenial
|
|
|
|
|
env:
|
2019-08-03 23:42:31 +08:00
|
|
|
|
releaseName=TaoQuickApp_ubuntu_xenial_x64.AppImage
|
2019-07-18 10:17:02 +08:00
|
|
|
|
cache:
|
|
|
|
|
apt: true
|
|
|
|
|
directories:
|
|
|
|
|
- /opt/qt512/
|
|
|
|
|
- ./linuxdeployqt.AppImage
|
|
|
|
|
- os: osx
|
|
|
|
|
osx_image: xcode10.2
|
|
|
|
|
env:
|
2019-08-03 23:42:31 +08:00
|
|
|
|
releaseName=TaoQuickApp_macos10-14_xcode10-2.dmg
|
2019-07-18 10:17:02 +08:00
|
|
|
|
before_install:
|
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then chmod a+x ./scripts/macos/install.sh; ./scripts/macos/install.sh; fi
|
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then chmod a+x ./scripts/ubuntu/install.sh; ./scripts/ubuntu/install.sh; fi
|
|
|
|
|
script:
|
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then chmod a+x ./scripts/macos/build.sh; ./scripts/macos/build.sh; fi
|
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then chmod a+x ./scripts/ubuntu/build.sh; ./scripts/ubuntu/build.sh; fi
|
|
|
|
|
before_deploy:
|
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then chmod a+x ./scripts/macos/deploy.sh; ./scripts/macos/deploy.sh; fi
|
|
|
|
|
deploy: # 部署
|
|
|
|
|
provider: releases # 部署到 GitHub Release,除此之外,Travis CI 还支持发布到 fir.im、AWS、Google App Engine 等
|
|
|
|
|
api_key: $GITHUB_OAUTH_TOKEN # 填写 GitHub 的 token (Settings -> Personal access tokens -> Generate new token)
|
|
|
|
|
file: bin/release/${releaseName} # 部署文件路径
|
|
|
|
|
skip_cleanup: true # 设置为 true 以跳过清理,不然 apk 文件就会被清理
|
|
|
|
|
on: # 发布时机
|
|
|
|
|
tags: true # tags 设置为 true 表示只有在有 tag 的情况下才部署
|
|
|
|
|
notifications:
|
|
|
|
|
email: false
|
|
|
|
|
|