作者:康林(kl222@126.com)
详见:https://github.com/travis-ci/travis.rb#readme
在 .travis 中多行书写脚本,使用“ | ” |
- |
if [ "$BUILD_TARGERT"="unix" -a -z "$RABBIT_ARCH" ]; then
source /opt/qt511/bin/qt511-env.sh
fi
deploy:
provider: releases
api_key: ${GITHUB_TOKEN}
file:
- ./build_android/${BUILD_TARGERT}_*.tar.gz
- file1
- directroy/*
skip_cleanup: true
on:
condition: $TRAVIS_OS_NAME = android
tags: true
参数说明:
直接使用加密变量,用 travis client 加密。参见:https://github.com/travis-ci/travis.rb#encrypt
$ travis encrypt GITHUB_TOKEN=bar
Please add the following to your .travis.yml file:
secure: "gSly+Kvzd5uSul15CVaEV91ALwsGSU7yJLHSK0vk+oqjmLm0jp05iiKfs08j\n/Wo0DG8l4O9WT0mCEnMoMBwX4GiK4mUmGdKt0R2/2IAea+M44kBoKsiRM7R3\n+62xEl0q9Wzt8Aw3GCDY4XnoCyirO49DpCH6a9JEAfILY/n6qF8="
Pro Tip™: You can add it automatically by running with --add.