forked from remix-run/react-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (53 loc) · 1.86 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
language: node_js
node_js: node
cache: yarn
jobs:
include:
- stage: Test
env: TEST_ENV=source
before_script:
# react-router CJS build is imported by react-router-config tests,
# so we need to build it before running react-router-config tests
- cd packages/react-router && BUILD_ENV=cjs yarn build && cd -
script: yarn test
- env: TEST_ENV=cjs BUILD_ENV=cjs
before_script: yarn build
script: yarn test
- env: TEST_ENV=umd BUILD_ENV=umd
before_script:
# react-router ESM build is imported by react-router-dom UMD,
# so we need to build it before building react-router-dom UMD
- cd packages/react-router && BUILD_ENV=esm yarn build && cd -
- yarn build
# react-router CJS build is imported by react-router-config tests,
# so we need to build it before running react-router-config tests
- cd packages/react-router && BUILD_ENV=cjs yarn build && cd -
script: yarn test
- stage: Release
if: tag =~ ^v[0-9]
before_script: yarn build
script: echo "Publishing $TRAVIS_TAG to npm ..."
before_deploy: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > "$HOME/.npmrc"
deploy:
provider: script
skip_cleanup: true
script: lerna publish from-git --yes --pre-dist-tag next
on:
tags: true
- stage: Deploy Website
if: branch = website
env: PUBLIC_PATH=/react-router/
before_script: yarn build
script: echo "Deploying website to https://reacttraining.com$PUBLIC_PATH"
before_deploy:
- openssl aes-256-cbc -K $encrypted_70c5e56b421c_key -iv $encrypted_70c5e56b421c_iv
-in website-deploy-key.enc -out website-deploy-key -d
- chmod 600 website-deploy-key
- eval $(ssh-agent -s)
- ssh-add website-deploy-key
deploy:
provider: script
script: bash scripts/deploy-website.sh
skip_cleanup: true
on:
branch: website