-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (65 loc) · 3 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: 20
dist: jammy
branches:
only:
- main
- /^v\d+\.\d+\.\d+$/
stages:
- name: test
if: tag IS blank
- name: deploy
before_install:
- git config --local user.name "LTO Network"
- git config --local user.email "info@ltonetwork.com"
install:
- npm install
jobs:
fast_finish: true
include:
- name: "Test"
stage: test
script:
- npm test
- name: "Publish GitHub release"
stage: deploy
if: branch = main 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:
- npm run build
deploy:
provider: releases
api_key:
secure: "j2HEaDBvryma/ohGaNNI7EVRQt6tLNlYZwa3bNmWnCFmDL6AFm5Nxru2OP3wxU0CrYHR/nExP1kQdFFDtBObdy7Levz443+sGN3TNiV76XJfOVDcGmhQpqcPQ4+/hYM6nPvR0s8HB3y8eJd65U/kJ4dLmPIvLDfJ67zX9By2LN++7kFHbcs3A/DipDwwyG3Zyc7gYSqvDNxZ2/j8Ycs2RwkwU9XMX84Bum3EdNiPHJ+R2oLmhJlUq8wVOtPbBbl3gFGIaY6b9+ScX/1maCTjbVmFYnBv0zex37G7HTI6T306UdkOFNWqI5uOZRWPTqdX7d3L9V5cIR8Sz4JYFhHBWszZTViB2aN0fZGJMZcp3HQWgdzo95TtAd0qIJM9jCGpudhlyR+bPXAfoJyrhncdQeaIMMmzwFn7Wr2i/7WYXxdS4DllCH7QvrooH2bfT3eon3jnsohZlNp2pMrFHz4kGWeq7EJUqEnhrfrWlb6g6i/huPL3fjm+qe7MoIu0aZRMcCNUmusD7ED4G9bvGT5BC87nckpSn9xUJJSCNjjXHsBFqB1470GYwEO0mhFp7Nr4vEn8FtyZbt/BdrmNk9rtYnIpgNxh2CjMkQ37Fty4fAvwJ1oq/pJZJHuSLE3ocBXWERldbiFL0byFjSIUpwOXzyjh9x6oVDQH+YzZ+tjU6/o="
cleanup: false
skip_cleanup: true
on:
all_branches: true
file_glob: true
file: dist/*
- name: "Publish to NPM"
stage: deploy
if: tag IS present
before_install:
- npm version $TRAVIS_TAG --no-git-tag-version
script:
- npx tsc
deploy:
provider: npm
edge: true
api_token:
secure: "FlmObYA/zgSvZzZQbVWeTtOYh/MY3Ng4CxmxEwUTwl6dV4qGikBXtGVEHlD6DpdBEIyHzkfC+Lhe8Dy/ovAK/eq0KlTOdJIN9YLKA2H/wGAzYywYweKacFEl5Mz97YA9HpevL5sSw/oQ+7PSMEFvMSW74mKCvVtjr3ob8nl8MLBPx2Pa89QTy0M94BzNuIfrQPnLbja21hnh4wvBllQ2cTJ0KgyEvrynFoxQsSXCpmL5+c51seXIT74Yumuk0qxMQLZ2IeVwWE34KGM0jLCwJ208IHeem6664lPOoBQCkLwHR64uWPiqLquiN4f9orDbc9qGh1Wzd5qezzerERBfANtQk8WVnngC4o0OsFzEYZaFHQiaqDzhSpjXd7Ytuhx+8wlcB8zX1iyeXy2FVSGNDpaKcUfPOtdNvPZL8e/H7UyG/cXcrusYNUthAm6GlfgmJrOfujrKoq4JB9+XDYGEcyjDYrHo6twadVRnoozHrGa+/X5pyk1K+raoJs+xBrtkSV72Gl4FwBLzyUyy0Uk/6wNKBUcomCObxUO+l9x9ySjZEO1Jcxsxz7uue8Xukg3+XSAtkoli66Yu6dMvDw0y7C22PqS5k/dj69B+uij+MNJoFB0dhLvsZyO7mccNl2I4AfnbckQM5VMYNzC9ya74zn2hF4JBxnd89518mLF52QY="
on:
tags: true
cleanup: false