Merge pull request #4 from onerain88/ci

ci
oneRain 2019-07-19 17:09:57 +08:00 committed by GitHub
commit 5fa6924070
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 0 deletions

21
.travis.yml Normal file
View File

@ -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

12
script/deploy.sh Normal file
View File

@ -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 ..

5
script/package.sh Normal file
View File

@ -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