-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
95 lines (85 loc) · 4.21 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
language: node_js
node_js: 18
dist: jammy
cache:
yarn: true
directories:
- node_modules
branches:
only:
- master
- /^v\d+\.\d+\.\d+$/
stages:
- name: test
if: tag IS blank
- name: release
if: branch = master AND type = push
- name: deploy
if: tag IS present OR (branch = staging AND type = push)
env:
- NODE_OPTIONS=--openssl-legacy-provider
before_install:
- corepack enable
- yarn --version
jobs:
include:
- stage: test
install:
- yarn install --immutable
script:
- yarn test
- stage: release
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"
deploy:
provider: releases
token:
secure: "x48Da71tfJA0vU3OCpq9xiFeib6h2c7B7XJbi/BqihVg9xjU1vThqHnf7YHMGxK2jZojDPI7YoNRcTX9Jh26ddujrjwBjOgpUsy8BpiV+nElqizQ+JXT/123azPpIZ8qIQhdqNX0dfpPPzh+oyGo1DRW3XUAxMJ9OoRwAecCK57XfyCUdCrdcVlPvrkkFqskCwMN38N1UwsqUCcUPgIgaDfNcxWRe0AKinCIrjjoa83UfuboS4RjbmnumARAIr0hf33JqdPtKWHRn6iGkP5PL7O9KGO2LsmywZtW+DqOgqbaa868muvILIbMDRl3Kjw4aC4Dayr02dVc67rmdiPBWezj4uqm8vTV7cSvyxzRV2tlzf+Q8XDfOslvjsKHRU+FgDoeYNQ5xYtjah8DkydCKrnHGs5tZTkPkPu5zzyF+KamrYBXFw9Nq4XwhMG/9JkekUSnVkwbDNdC3AvkJCp0ko11kYF7UnzPivfRIZ5Ja+zDubfYkNNrKeV1f3vyCWZ1Nx3/d+SJqcPQXIOhq9peMbeSZCCCuDZ0YXi9t3/pPj75fhKgbcz6C1dNLvu1en/N1IgXYRGofI9XEKCX4+nNotMoSU5WJZmxiyU/cUhSVdtnzuHwCULPeTbTWeRyFUBU0ghNQC4/u+X+3DOr/EPcpmtbPDEil0WRnleoe4j1V+Q="
- name: "Testnet"
stage: deploy
install:
- npm version --new-version $TRAVIS_TAG --no-git-tag-version
- yarn install --immutable
script:
- yarn build:testnet
deploy:
provider: s3
access_key_id: "AKIA5RMFNFEWJOX5Y2AX"
secret_access_key:
secure: "Woq3oNJHv56U3etaaM/WA3DFUOxKc/bhJozhiS3+TWZ+VEqTgljI8BbaqB/9iHbGcrXOtGS6ixQ/q/9t7yKKFc16fRQmA8yOeYC9Unu6DBSKdUhk2AvTlJ4UoPQ7vnPF7k8TbMyxnW2CZV5GJ36xXaRwzrzYyTGaUigh4Y5AvVyeoEjjEeOzNpCF8i3v9N42btD1Se8pSS+uGU3UDsZ2KjtJCFVFyVDDUzhnzad4o1fdMIuz1Q8GRtHNlwVSU6b4RZ953DihWwPU76S4nC+wcnzAr5cGiTXSNUM5Z0z1FQSPULOQ8KbPkXEuXUu6Sp6rnUX18yRm0a1vFqC42IeWzN72edMMpTCrd/TQsq0KJdoWgU+hKYvmZRWUyQOLz9k9CLbBXsAHAlDXCSnsiS7dRAXmM8q1CGptycLbrbmwdfdG1Zkp/DR5+5uaZo99Ojs99Dzh2HtQ7oS8WehAOcfxfSsq3B+7XVZRmWofvGxUCDm8Z9uKa+efkui1rYfKnMQxhw1Wi3qoT2aufu2qmrWik82+3DHMVOkR8l2xChlAefk67lCFqncjeDSREvBRjFPU36jiAuqZsKVV1CgOr999N6E1Q4+S+4iIrIzoa6P3Al4Fsfp9uUYItMyJfVD46h/3s5dYKhkh7rFlC2ELa+Ce5x3eMmoL5QBfHyXKUSxYbZ8="
bucket: "lto-wallet-testnet"
region: eu-west-1
skip_cleanup: true
detect_encoding: true
local_dir: dist
on:
tags: true
- name: "Mainnet"
stage: deploy
install:
- npm version --new-version $TRAVIS_TAG --no-git-tag-version
- yarn install
script:
- yarn build:mainnet
deploy:
provider: s3
access_key_id: "AKIAQUQNQW2MPO46CH4R"
secret_access_key:
secure: "Ak/IwYJC8PyLKlLhjRXq2CIewcb//JE2DmCLcJ4zf+4duz1UU+VqttFzg7CQIajxqgCiBhsawOXmreuBq2LnjTt+JrI+aj4V9oRxIoGcAm44x+MDJqscyIamqlWfqMxc79YWUnDz6tGG46IGWmSFf1H5jwpFjNpjP7cqxnYwOXniDhjNa9NlV2NoCVUwenNHficgDFmmmwd6WpIwfFJsIBW6VGT5HoAo4nszqNAwb6F1qoiFESOnAkRS1pm3Nl6Rbnz4HsfAZCIwbAEoh+dV0Zf5V3EZmQDQKkQ17JBXd1edll9E5amCTlU4fQIdl9gwQ1+haiVDoDvGbNIqQsTH6LtHtFsTGBOA50ERDvgFTe1Jqs9lCjAUhAH8XgUppB3RfPG7JravxePBDxoi5voW3Cv0oDYXiDXcoLvcIvDDnlUpHhW7rQpSIAMLdiVJhey2q/xuPXjMJzzGlG9Z1n4dy63QXsQAxc4nkw1+lcvqerlGIy424s43gVeM9RGJpSRnCUjyJ2Pgz+z/GRSqVK6xYvcqAAHXiBCJwoCafHiCxTV9mIuaZmnH06qpcloVDbH4u+e/+b3Bg2/PikdINGVVWMXKIJFPq0lHo1fKbJMtRd4MXS4vWj+PiPQuSDs6vWOxylzWDhJzSgzdvlyCJTtgznhK9Nq85fYZ/9h4AGCsOPo="
bucket: "lto-wallet"
region: eu-west-1
skip_cleanup: true
detect_encoding: true
local_dir: dist
on:
tags: true