-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (63 loc) · 1.8 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
61
62
63
64
65
66
67
68
69
# ===============================
# COMMON SETUP
# ===============================
# Travis only runs on commit to:
# - continuous branch
# - master branch (for releases)
# ===============================
# TOKENS AVAILABLE
# - Added via web gui -> settings
# - GITHUB_TOKEN
# - NPM_TOKEN
# - TRAVIS_TOKEN
# ===============================
language: node_js
node_js:
- '10'
env:
global:
- NPM_VERSION="6.4.1"
- RB_CLI_VERSION="6"
- RB_REPO_SLUG="$TRAVIS_REPO_SLUG"
- RB_PROJECT_PATH="$TRAVIS_BUILD_DIR"
cache:
directories:
- node_modules # repo root node_modules
- "$(npm root -g)" # global node_modules directory
- "$(npm bin -g)/rapid-build"
# Install Global Dependencies
# ===========================
before_install:
- if [[ $(npm -v) != $NPM_VERSION ]]; then npm install -g npm@${NPM_VERSION}; fi # version check
- if [[ -z $(command -v rapid-build) ]]; then npm install -g rapid-build@${RB_CLI_VERSION}; fi # if not installed
# ===================================
# SPECIFIC JOBS
# ===================================
# - before_script:
# Runs after npm install.
# Stops build immediately on error.
# ===================================
jobs:
include:
# Continuous
# ==========
- if: branch = continuous
before_script:
# build component
# copy root files to: dist/client/ (ex: LICENSE)
# trigger showcase ci build
- npm run build-continuous
# Release
# =======
- if: branch = master
deploy:
# build component
# copy root files to: dist/client/
# copy npm config to dist/client/
# publish npm package from dist/client/
# publish github release from master
script: npm run build-release
provider: script
skip_cleanup: true
on:
branch: master