-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
43 lines (43 loc) · 1.74 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
38
39
40
41
42
43
notifications:
email: false
language: csharp
mono:
- 5.12.0
solution: B9AnimationModules.sln
env:
global:
- PATH="${PATH}:${TRAVIS_BUILD_DIR}/bin"
- VERSION="$(git describe --tags)"
- KSP_VERSION="$(cat KSP_VERSION)"
- KSP_DLL_PATH="/opt/ksp/assembly/${KSP_VERSION}"
- BUILD_DIR="/var/tmp/b9_animation_modules/build"
before_install:
- sudo apt-get install python3-pip python3-setuptools
install:
- pip3 install awscli --upgrade --user
- install-ksp-dlls
- test -f "${KSP_DLL_PATH}/Assembly-CSharp.dll"
- nuget restore ${TRAVIS_SOLUTION}
script:
- msbuild /p:Configuration=Release /p:ReferencePath="${KSP_DLL_PATH}" ${TRAVIS_SOLUTION}
- mkdir -pv "${BUILD_DIR}"
- mkdir -pv "${BUILD_DIR}/assemble"
- mkdir -pv "${BUILD_DIR}/assemble/B9AnimationModules"
- mkdir -pv "${BUILD_DIR}/assemble/B9AnimationModules/GameData"
- mkdir -pv "${BUILD_DIR}/package"
- cp -r "${TRAVIS_BUILD_DIR}/GameData/B9AnimationModules" "${BUILD_DIR}/assemble/B9AnimationModules/GameData"
- cp -v "${TRAVIS_BUILD_DIR}/README.md" "${TRAVIS_BUILD_DIR}/LICENSE" "${BUILD_DIR}/assemble/B9AnimationModules/"
- cp -v "${TRAVIS_BUILD_DIR}/README.md" "${TRAVIS_BUILD_DIR}/LICENSE" "${BUILD_DIR}/assemble/B9AnimationModules/GameData/B9AnimationModules/"
- (cd "${BUILD_DIR}/assemble/B9AnimationModules" && zip -rv "${BUILD_DIR}/package/B9AnimationModules.zip" .)
after_success:
- mkdir -pv "${BUILD_DIR}/release"
- cp -v "${BUILD_DIR}/package/B9AnimationModules.zip" "${BUILD_DIR}/release/B9AnimationModules_${VERSION}.zip"
deploy:
- provider: releases
skip_cleanup: true
api_key: ${GITHUB_DEPLOY_TOKEN}
file: ${BUILD_DIR}/release/*.zip
file_glob: true
name: "B9AnimationModules ${TRAVIS_TAG} for KSP ${KSP_VERSION}"
on:
tags: true