forked from dram55/MarioMaker2OCR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
37 lines (33 loc) · 1.08 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
language: csharp
solution: MarioMaker2OCR.sln
script:
- export VERSION_NUMBER="1.0.$TRAVIS_BUILD_NUMBER"
- python setVersion.py $VERSION_NUMBER
- msbuild /p:Configuration=Release MarioMaker2OCR.sln
before_deploy:
- |
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '^(readme.md)$|^(screenshots\/)|^(LICENSE)'
then
echo "Only doc files were updated, not running the CI."
exit
fi
# Set up git user name and tag this commit
- git config --local user.name $GITHUB_NAME
- git config --local user.email $GITHUB_EMAIL
- export TRAVIS_TAG=$VERSION_NUMBER
- git tag $TRAVIS_TAG
- cd MarioMaker2OCR/bin
- mv Release MarioMaker2OCR
- zip -r MarioMaker2OCR_$VERSION_NUMBER.zip MarioMaker2OCR -x "MarioMaker2OCR/Test/*"
- cd ../../
- export CHANGE_LOG=`git log $TRAVIS_COMMIT_RANGE --pretty='(%h) %s' | sed ':a;N;$!ba;s/\n/<br>/g'`
deploy:
provider: releases
api_key: $GITHUB_KEY
file: "MarioMaker2OCR/bin/MarioMaker2OCR_$VERSION_NUMBER.zip"
skip_cleanup: true
name: $VERSION_NUMBER
body: $CHANGE_LOG
branches:
only:
- master