-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
60 lines (60 loc) · 1.89 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: node_js
matrix:
fast_finish: true
node_js:
- '8'
branches:
only:
- master
# tags
- /^\d+\.\d+\.\d+(\-beta.\d+)?$/
env:
global:
# GITHUB_TOKEN for yarn deploy script
# to generate yours : travis encrypt GITHUB_TOKEN=<your_GITHUB_TOKEN> -r tintinmar1995/cozy-dispers-app --org
# REGISTRY_TOKEN for yarn cozyPublish script
# to generate yours : travis encrypt REGISTRY_TOKEN=<your_REGISTRY_TOKEN> -r tintinmar1995/cozy-dispers-app --org
# N.B.: the --org option is needed only for public repositories
cache:
yarn: true
directories:
- node_modules
before_install:
- curl -fsSL https://bootstrap.pypa.io/get-pip.py | python - --user
- travis_retry pip install --user transifex-client==0.12.5
- install -m0644 .transifexrc.tpl ~/.transifexrc
- echo "password = $TX_PASSWD" >> ~/.transifexrc
stages:
- prebuild
- build
jobs:
include:
- name: 'Lint'
stage: 'prebuild'
script: yarn lint
- name: 'Tests'
stage: 'prebuild'
script: yarn test
- name: 'Build app'
stage: 'build'
before_install:
- curl -fsSL https://bootstrap.pypa.io/get-pip.py | python - --user
- travis_retry pip install --user transifex-client==0.12.5
- install -m0644 .transifexrc.tpl ~/.transifexrc
- echo "password = $TX_PASSWD" >> ~/.transifexrc
script: yarn build
deploy:
- provider: script
repo: tintinmar1995/cozy-dispers-app
skip-cleanup: true
# deploy the build on a build branch and publish to the Cozy registry
script: DEPLOY_BRANCH=build && yarn deploy && yarn cozyPublish
on:
branch: master
- provider: script
repo: tintinmar1995/cozy-dispers-app
skip-cleanup: true
# publish stable or beta versions using Github Releases (git tag)
script: DEPLOY_BRANCH=build && yarn cozyPublish
on:
tags: true