-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
74 lines (70 loc) · 3.09 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
70
71
72
73
74
language: node_js
dist: jammy
node_js:
- 18
- 16
- 20
cache: yarn
branches:
only:
- master
- /^v\d+\.\d+\.\d+$/
before_install:
- git config --local user.name "LTO Network"
- git config --local user.email "[email protected]"
install:
- yarn install
script:
- yarn test
stages:
- name: test
if: tag IS blank
jobs:
include:
- name: "Publish GitHub release"
dist: focal
stage: deploy
if: branch = master AND type = push
before_script:
- CURRENT_VERSION=$(git describe --tags --abbrev=0)
- |
if (git log $CURRENT_VERSION..HEAD | grep -q -i "\[bump:major\]"); then
NEXT_VERSION=$(awk -F. -v OFS=. '{$1++;$2=0;$3=0;print}' <<< "$CURRENT_VERSION")
elif (git log $CURRENT_VERSION..HEAD | grep -q -i "\[bump:minor\]"); then
NEXT_VERSION=$(awk -F. -v OFS=. '{$2++;$3=0;print}' <<< "$CURRENT_VERSION")
else
NEXT_VERSION=$(awk -F. -v OFS=. '{$3++;print}' <<< "$CURRENT_VERSION")
fi
script:
- git tag "$NEXT_VERSION"
before_deploy:
- yarn build
deploy:
provider: releases
api_key:
secure: GQAlQSTE8yRcvPTD4b71cOx9UWAINd5L6z1p1wW2CB1dKmCFVZFXePaj2itbBP0Io0C3PQdHf6SHwbLvW8oWlQDVnExXeXNQ4+NZVTJxuzW2wk7FQ1t1jRMVWTvr55M4jBoIzSSUGKbqgAJUHajeyUBnzPRtR3yuvekiV5QNFF9XmcP1tKzcb8k3RAB8Xly5N2owNungZk3ET4TBa9JYyqFal3Y0CYewdoIb6zfaiCI2a5N1wbVC/SI0VFLGBpZvJfyjrFLQY9WjoViAKcY5f/u27oBprwZEOLXutb3ZhSm3D6R73Y+XVs8wAYiB/WNPQWh3BSgRFBDZW9lG/vkz0RUbWGJ26F4KBzr+Lvr5xdgsjrpGZ0h1QYfVKFmASgtHJouTl3ieCUsJsoUP2SZn6GmIQ8nQGlP+x85um2yig5zntbJyyOpHOC7G3yLgBkKbPYQ+MWyEQD/q/Uj9tp9N8vCD8EO6UK8k+1hyeGw7IahiLVKcT+nUij0CGQ6BfshIiyw/24Daq3Ow0quH6rJRE5yiG5890wkDZFZ0HiLh9PMWYeKA7oXeFH3hqlQ6xK9sqFdZJBMHxRCHNgkklMc8AyUzLo9mWuwdjmMHt2yv/uMabxE0F2iMOQV2nZaCg0FFws7rEkmTF2JHwJWyt/SyUKBNNmcuUctH87Z9uRn9CWk=
skip_cleanup: true
on:
all_branches: true
file_glob: true
file: dist/*
- name: "Publish to NPM"
dist: focal
stage: deploy
if: tag IS present
before_install:
- yarn version --new-version $TRAVIS_TAG --no-git-tag-version
before_script:
- npx tsc --version
script:
- yarn compile
before_deploy:
- npm install -g npm@9
deploy:
provider: npm
email: [email protected]
api_key:
secure: MsWwbOSQKOXnZYcaIR/8YXuROE20smQA5BY/VbS2uHaoR+jRoTryqcXADdTD48HJcknsTn9CuN978NL2HTKC3hT0UD/a9neY0R96WpaXbxDU8WepU8KI6kTBKjzTlvlpgPvh7KQtuo+Zbzwj7zD/MFT0zQMuxdQJ6pLT2tU863M9puJEnJ4QQsV98xv5SASqe/5ZRpSMHzlsc9wccz+GTpfycmmJDnVpqm/Be8kGfFx5BgzN6DE6H4V87aH3HqTUIr8GvpX39mWBrK4RBCtFz/E2XVDaCBgi9VEEygQZHE9Us9MUV+gaIjSYMVSHkRbg98jd08mVvKK2qQ3hnEWWM3D8Tq7j7Pzg5lfQYiApNOx70Kb1tvIVoBdo4jUPilO3zryd6mminXCnZzFzVkUmSQXdpy4hWEw/4Ed/JMOQQ12um8oGl9u+EhYjDCReVh8/p5QBdhBah1D41E+VI7ejwN5dEpdyi/2MXPbc+cHfDaNVcXhSnG1iFQyUA614CQnA18Pywna12UGQyupgRAApUNwqEHT5oB9gcB9ZH7Q+uy3KcFvC+Fy2Yw6k0ygGNTp+8CCj6hirpREkfINlTLG19qOZArwr8Dkw36Mlo+WOj3v0/Lm68LcMAspT/LluaUNnkSgFU3vt4ffBaefhyKiO5ufxBDyykJMr21ho5xZAdgE=
on:
tags: true
skip_cleanup: true