From c68a3103bef9344fc5d1d5c20e4a60781cd7716c Mon Sep 17 00:00:00 2001 From: oneRain Date: Fri, 19 Jul 2019 16:58:44 +0800 Subject: [PATCH] ci --- .travis.yml | 21 +++++++++++++++++++++ script/deploy.sh | 12 ++++++++++++ script/package.sh | 5 +++++ 3 files changed, 38 insertions(+) create mode 100644 .travis.yml create mode 100644 script/deploy.sh create mode 100644 script/package.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b608f84 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: csharp +solution: csharp-sdk.sln +before_install: +- sudo apt-get install doxygen +addons: + apt: + update: true +before_deploy: +- sh ./script/package.sh +deploy: + provider: releases + api_key: + secure: sXh/LKyPFEVh0agg9qmceeo6GFyNQY6rroZvCt4kklDR1bZBqRYMC7zpyvh7hSWOQy1p+cve7+8DwLBH5u12LqNBzjBlG+NOEBuNnjfoStuGkdT16eEhNXvJffqR40FDO/h7h5mPzDusZ+RMAmFZwvnKbOmfl3jiCx6ZwxtTBU0d/X7tSRUMO1w/beeOmOLRBahWuNDhOcTZWhgWnbKyuGnhM8YJbaMzb1a0IXPqpZ8v653ZVVCb/TqgRdED6kFfbz3M7ryXHHmRwR32ytN9P8P2L9zWDaFo/h/9r34u/bExGQlA0YAN06QcKQhC98XJ2zO7hqCqKODv0Q8c9Qztor+HSiJSraFMGMGa2gzei6B0oeEofod7CexTnrDeSUoa8qHMf8GLxcedDmt8fz3aWojcjUgernZ4lUpppDHx4mdDM6nj8HFn4HVi95Q29pVrJihJZ+rRf3XMnMoTt5/MGha5gzTww0WBfeFHALxPI+ehZivmd+JcLVb7LJx/XhK8F8bcWgBKcKgWzKT0xVcDjpjgyQ3qD4TFj+qxtqsvCgWYFhfkKegerTkCOYHa2X9qdSawvecO9WqhMLmFAmdTm8dHQrx1Dk6DUZ2+2/wPFjvi4UJYco1UGb3RYcH6M2u9H3g7csL9+JyIK+qAoCSA0O0nDgC6emL8wF8MSI9R90o= + file: LeanCloud-CSharp-SDK.zip + skip_cleanup: true + on: + repo: leancloud/csharp-sdk + tags: true +after_deploy: +- doxygen Doxyfile +- sh ./script/deploy.sh diff --git a/script/deploy.sh b/script/deploy.sh new file mode 100644 index 0000000..271e4da --- /dev/null +++ b/script/deploy.sh @@ -0,0 +1,12 @@ +#!/bin/sh +echo "Deploy API docs to github pages."; +mkdir gh_pages; +cp -r Doc/html/ gh_pages/; +cd gh_pages && git init; +git config user.name "leancloud-bot"; +git config user.email "ci@leancloud.cn"; +git add .; +git commit -m "Deploy API docs to Github Pages [skip ci]"; +git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git master:gh-pages; +echo "done."; +cd .. \ No newline at end of file diff --git a/script/package.sh b/script/package.sh new file mode 100644 index 0000000..0c63813 --- /dev/null +++ b/script/package.sh @@ -0,0 +1,5 @@ +#!/bin/sh +mkdir Plugins +rsync -av --exclude='UnityEngine.dll' ./Storage/Storage.PCL/bin/Release/ ./Plugins/ +zip -r LeanCloud-CSharp-SDK.zip Plugins +rm -r Plugins \ No newline at end of file