-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
42 lines (42 loc) · 919 Bytes
/
.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
language: node_js
node_js:
- "12"
cache:
directories:
- "node_modules"
env:
global:
- RELEASE_BRANCH=main
- POST_RELEASE_BRANCH=main
- RELEASE_MESSAGE=release
before_script:
- npm install -g yaml-cli
- npm install
- npm run build
- npm run postman
- npm run version:prepare
- npm run version:pack
script:
- npm test
deploy:
- provider: releases
skip_cleanup: true
file:
- _build/openapi3.yml
- _build/postman.json
api_key: $GITHUB_TOKEN
on:
tags: true
jobs:
include:
- stage: test
name: test
script: npm test
- stage: deploy
name: githubPages
script: /bin/sh travis/githubPages.sh
if: branch = env(RELEASE_BRANCH) AND type = push
- stage: release
name: release
script: /bin/sh travis/release.sh
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)