-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy path.travis.yml
69 lines (63 loc) · 2.71 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
language: node_js
node_js:
- "8"
notifications:
email: false
before_deploy:
- test $TRAVIS_TEST_RESULT = 0
jobs:
include:
- stage: run tests
script:
# Ensure Travis aborts without running tests if the lockfile needs updating
- set -e
- ./scripts/check-lockfile.sh
- npm test
- stage: check for new release
script:
# Ensure Travis aborts without creating a release if version hasn't changed
- set -e
- ./scripts/check-release-version.sh
deploy:
# This whole section is only run if check-release-version exits without
# error, which only happens when there is a new release to roll out.
#
# GitHub releases are created from the tagged commit. All other deploy
# providers are only triggered on the master branch.
#
# Heroku is configured to automatically deploy the following branches
# once CI passes:
# master -> http://govuk-elements.herokuapp.com/
# -> http://govuk-elements-review.herokuapp.com/
# latest-release -> http://govuk-elements-sass-release.herokuapp.com/
# Create a new tag on Github and update the latest-release branch
- provider: script
script: ./scripts/create-release.sh
# Update the NPM package (https://www.npmjs.com/package/govuk-elements-sass)
- provider: script
script: echo "Deploying to npm ..."
script: cd packages/govuk-elements-sass/
- provider: npm
email: [email protected]
api_key:
secure: Cn1t69Nw5opWGkYfyYzxlyZy2i8EeXcHVLNr/gvW04Vg4leRQKc/W3PUYNUduWUxPCQa1f3akWW+q3z/tbIknxhVH40IoH2+4TmeaU6uRPdo9scZKYga+cE/1+auNAgSz289mTqxCIHqOZNmYVqcvndjiro/BZmO+WPxeSxTf3U=
# Upload the contents of packages/govuk-elements-sass/ to GitHub releases
- provider: script
script: echo "Deploying to GitHub releases ..."
- provider: releases
api_key:
secure: HZD7iqjcf/Yg792jMqksiVsCSQJSZG2TJ77EIGNh7qsdmCSJneUKPpeohQIEvkpjKiz+RyP4v0UqHx9lxHx7rBDmzOdTUCKAV3biTFvmf/W6IUb4UGXbjsDA5AMlNgpCdy4xT2iYBSyUKRR4qLjLDITduDoRQZFET5Z52nzcJgo=
file_glob: true
file: packages/govuk-elements-sass/*
skip_cleanup: true
on:
tags: true
all_branches: true
# Allow this stage to fail without breaking the build (as we only release when
# the version changes)
allow_failures:
- stage: check for new release
sudo: false
env:
global:
secure: eFtS+dlf00c3h4Rpp1FSZw6wOmZPmY4lYbqPV6MQa+VUgh+FRbUYOjDJP3UFaTsWNxMIL4mhEKFYLnkVftBdz1FgPjhIO3jNXleGMgVVedtD+qo5hTu1KI39t68K2YcELx9+kzeccX77WVmv/qJTVg7+f84WP9ebzVOJCQprJuw=