This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
52 lines (52 loc) · 1.57 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
dist: bionic
language: node_js
node_js:
- 12
- lts/*
cache:
directories:
- "node_modules"
- .eslintcache
env:
global:
- DEV_BRANCH=dev
- RELEASE_BRANCH=main
- POST_RELEASE_BRANCH=main
- RELEASE_MESSAGE=release
before_script:
- . ./travis/node-functions.sh
- VERSION="$(node_load_version)"
- log_env_variables
- sudo apt-get update
- sudo apt-get install python3 python3-pip python3-setuptools
- pip3 install catapultdocscli --user
- npm run build
- npm link
- catapult-docs-cli cli-usage --config .clidocs > docs/$VERSION.md
jobs:
include:
- stage: test
name: test
script: npm run test:cov && npm run coveralls-report
- stage: test
name: lint
script: npm run lint
- stage: publish
name: github alpha pages
script: push_github_pages $VERSION 'docs/'
if: branch = env(DEV_BRANCH) AND type = push
- name: alpha npm
script: npm run build && node_publish_alpha
if: branch = env(DEV_BRANCH) AND type = push
- stage: release
name: release npm
script: npm run build && node_publish_release
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
- stage: release
name: github release pages
script: push_github_pages $VERSION 'docs/'
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
- stage: post release
name: tag and version upgrade
script: node_post_release
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)