-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
60 lines (60 loc) · 1.69 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
language: python
python:
- 3.6
install:
- pip install awscli boto3 requests requests_toolbelt
branches:
only:
- master
script:
- python build_scripts/build.py
before_deploy:
- VERSION=$(cat build_scripts/version.txt)
- CHANGELOG=$(cat build_scripts/changelog.md)
- IFS='/'; BASENAME=($TRAVIS_REPO_SLUG); unset IFS;
- RELEASE_NAME="${BASENAME[1]} $VERSION"
- echo $VERSION
- git config --local user.name "ChrisAdderley"
- git config --local user.email "[email protected]"
- git remote set-url origin https://ChrisAdderley:${GITHUB_OAUTH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
# Only tag if this is the first before_deploy (runs for all providers)
- >
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
export BEFORE_DEPLOY_RUN=1;
git tag $VERSION;
git push origin $VERSION;
fi
deploy:
- provider: script
script: python build_scripts/deploy.py --curse
skip_cleanup: true
on:
condition: $TRAVIS_BRANCH = master
- provider: script
script: python build_scripts/deploy.py --spacedock
skip_cleanup: true
on:
condition: $TRAVIS_BRANCH = master
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: "nertea-ksp-modding-releases"
local_dir: deploy
skip_cleanup: true
acl: public_read
region: us-east-2
upload-dir: near-future-spacecraft
on:
condition: $TRAVIS_BRANCH = master
- deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file: deploy/*
# Removed as doesn't handle newlines
# body: "$CHANGELOG"
name: $RELEASE_NAME
skip_cleanup: true
on:
tags: false
condition: $TRAVIS_BRANCH = master