-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
74 lines (69 loc) · 3.1 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
language: node_js
dist: focal
node_js: 18
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 "[email protected]"
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: "idzEH5UHJ3c0FKFsgJQ7xIeLzjT0AwKlpQ5SZL6i3Xd1OxeLOLgqnfBZZpRAj0f/AGcBDlna/p9cAlr9OraXRzjL53kQwHspDCipxqdhhe41GrBOrImJBLDYOOWG/Vb0kDNHvJVHWcd8QRQWQPEBqQ0H/jE81DnEjwWdq8VOA+w69SseIzHwLwfHTiQT1z4umemCmfxO0aGcPudWtoa3+V/nBkqKGVFzPI8ozSh5dQ664uqUYUZAHpwtQayjhz2lkIx/iwdttEJVRs+nuMyDmgTugP/voLaBi6Ag1HC9XRI3zdt2ueJa6i2KjTYGdlULghkvOt6pGIEl1uLUSPwV2VsUZnQpRVpN0lLqeXFCnZzZdB8/9t1Td7GM5PGe77bkBecv2+Xvw/qG3Q8gyMcd5AznCoT2XWTlPwFSWTzVun7Ro40+1mvtYgJtRstmWwU6sLFmbiBjavIG4BiBhoVaEuXj1zdQmbTIZiRPEwywxWu0yVMF6f20iORVcxNLfsuz4wmKEErodE4dG5QykIV187+npNJ/zjDJ6kEp0UL9Mptx/M8ot0cdnoYn5SasJBoY63bTvq3joraqXrjqG1aB6Z2XFSlpes/JSQJcVo1Stbk5fpPBVJ/7KpfhIZNn0BVMj+8md2V3TzoxP0opA59m2/4xmcYHivvQMRdnFewmcI0="
cleanup: false
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
install:
- npm install
script:
- npx tsc
before_deploy:
- npm install -g npm@9
deploy:
provider: npm
email: [email protected]
api_key:
secure: "rLJx3dLxxSQ/Exv1TMtnqwzJhXIA3T33orDnargxkjHuqbfVj9S3l/O0wxAKHjZgfujkponcwmeAidYocjrPWXCJqIkgZ7rCegkg3Vf6nOF4mojzE3uKaU2T3bgLzUobjYzjuxTvzDHEOXRIwpJqvEwyV6NQ5DPnmlodlocnk+zmJo68FZgW7tH+W9QDWK9DmUYsFwwQ00qaFNXLtzcxUFk8WqJwufQ4rJEsPSMqnCLXJCvZ5+mHsXIxiunMo3oA6ogRYhlYN6L5EtuqGmT+DBdj7bnKpVI3wBDKlghN+zAbhVTSQ9ZhIRjiSGZ7uSOtWD5eNQChVYVRzdGy/OElxlmgmUl7mBhacRmHJRyNjfy4Umas2+DRO3mJSdUY5jClu4qU2jt5EjknA79sFrBee6KKaZvxl3+bJK3qVYVa5EwrPl2j4eVcfcTMuB2Ls8s6SEsHKBkderRfIiRnl3CfUzaUtI7K/mHzZg4Xs/UNNUNkSHtkzgK0fKHkn+/E4qa4Z54+pcoPJ0orxc/neUDRhMhST5Y5u4ImuUWhVIUNYm0aWA2s8mKf5C75G5mifPBiMrprKgx0N4yndsPYCVaOP94iqQD4rYhBYZN8K1XjM0stSXcwj7TB704s3cQnCmIWqhydKBbhoCMNO24d591kEUTQTKEJBg/yEgoJ1ilD6L4="
on:
tags: true
cleanup: false
skip_cleanup: true