-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
89 lines (83 loc) · 4.17 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
language: node_js
node_js: 18
dist: focal
addons:
apt:
packages:
- python3
- g++
- build-essential
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)
jobs:
include:
- 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: "ekKbA1LGADd9Fvjil4dG31g8K1m7tAlIB1OeKIwMJMzXwzKUxaXnJ5gcvDX9+ipVlhwwQ5C4YSHql1DDAA/soUuBTxobDyZiw+z9SzUPsXn9I7Ghilphy8DAxpCkn6rAmzvYj8xmlvukhLb1BA3CnRXunsCjDJCsuwD+BnGq/krOgUjR3NFj+I+PGZgAP+KeF7sw9PkSBAoYwb5n+EwYsad8H6SSv80iZd/ZsKjIRdFAWqaFxF/ydM8bmQSCxqP8WiGgzzNeJjK47y1LDgKe7tfHA5Ql3gEde0oQ7Vzoqm9v5aDSPaA8Toa1/etDB81GB29biJ0b/51cv6/ALaQy+N35KJXHTDNfwKmkN1DI6/SmlYC8AwRn5FykC7AgwagW+dhnU0N1kV7+m9QLD4sUWFj2C9KeV3uziZ+jj9pLUCbmeThe06WsE4RuUy267KmfbZUXJUUWCCgjxh3DaZx/dvWw05b6h6Ulm7TaK1Ns/FyBKgoCCI+fnF0+IVyNs+VpeOjbmyPTlQqz7DAEXyBuZCieIPTnuDkCXJpMXi2v5TWKBnYFu3wDpNFdf5QF0qzodljGhMp6oZHLAQUZRb7tVuou/UcP+JmYFGAN+K9dthAwDAN9nIEgiyOnu0Wp9UjTytcpFCLxq0pj+GKrWwvLSlOWOzMUhNSfPrhnh7FACnc="
- name: "Testnet"
stage: deploy
before_install:
- yarn version --new-version $TRAVIS_TAG --no-git-tag-version
install:
- yarn install
before_script:
- cp .env.testnet .env
script:
- yarn generate
deploy:
provider: s3
access_key_id: "AKIA5RMFNFEWJOX5Y2AX"
secret_access_key:
secure: "vr7rI0fdxyHuiAmd/B52vBnpfBOHDatjKi3nQ8iFg5/yvlYgfduCdR0Qvd/fLvh0sKGuJbxAsO6Or3nZI+PpH15laIc5gQmUSu38VyKkfnZLt3cUxvjlowIKHAR2Ie0qc2Flddx8FmWTnmvnWCL3/Avsmf1MmDCiHG3Hq1QIPMJbp8gBtrVtKbk6qSakzx0cVGG49rcy8AutLo8g9eucOT/3+kSU42XNop11JxEevGjvn6S+Yi9HjIRRsZ6M/8ooyruI9CLwFmtsF+lBvJD854K9f20tLux5ZijBJN25/5T4D+CA3jYwk5Lr6UnT+GA3eDsoJH4CWsIArwqBr0kWFKxA47F048jMsstuGpC7GjJlTjh1sAeOwYLTRjiMlZImUF4ugWOsaOoa+s8ZzuGOu+PCaRVlILEx6hzov8hYUQMbb4/fAWFqdlema6eu128//GiiKewX3xR+cTva42ttkoVE7S2fgwjDdcjOGT62ysXtI04sOht5xeK2mm/tvcBK5LiRfDF6Q/z0c7ktHtF9p/F0XLvEcuftaiEObnY7pjzLo36RCBICYK1Yq8UHkpdiDX1tOHw4UUTLPwZtLU5rU/rKHOOwTmYU8gpY9yBpCHDh0BcpAq/q1mkRnJlZDSv55gn/7VtGx027RaKBDViomaqYLovQmWbzlk1hyjRVOaY="
bucket: "lto-explorer-testnet"
region: eu-west-1
skip_cleanup: true
detect_encoding: true
local_dir: dist
on:
tags: true
- name: "Mainnet"
stage: deploy
before_install:
- yarn version --new-version $TRAVIS_TAG --no-git-tag-version
install:
- yarn install
before_script:
- cp .env.mainnet .env
script:
- yarn generate
deploy:
provider: s3
access_key_id: "AKIAQUQNQW2MPO46CH4R"
secret_access_key:
secure: "gbsKBoIfsHSu0BKs14AFNN/rT3WbZ6DmLjwQrePUd6SEfVaiVvVlmDd9n5fpzf8rKGpUsmShxwpo68nPVg72RZGqkt4iyChIPqhh9SmKB7KFzUDL9Eb7ITBZC5u4yDtQZyooBD+nQEc3pOyW2i+DFny9RdtXl+AGh2m47kOLXB2xdqPpBAyZQRGn3etn6y4KE8B4uJt4J4XptTPBqW5pdYYNZjExO7NeJiPNsqNcacZ34YWwWKc9UQOPt8r66wcSh8DPbVBxFvZk3HHsZsTjSdQuYT9/iwWZMJHRInbjVR/g8UZv0CRUkEArTmXRrVQBIUfvAqm/b3RwmkoP5FIbL08CEQawnpoeclQyodHTq3/UaVurbDqhWyk4kJSyamg0drZxZ5KslZCVwB70IbYeXUcWgGW+dTK1BvyiytPhjPuJ8S9zjGW+Qv/XZcHumgfrexM2EjJQMPjakwZaINmdR6I6IZGO7fyxtpIoc4lfzHnP86d3jAm6jvYHbWVn41aR+x86PUfcXH84NUKH/KwMopeK0iCLJLfyqqlRYKqm2ftMJTHXlsjrGoNzUivvgFjbprACG+h64fn7IfCl9pUoWv5Lly3wr7S7uF+5gY3mKCjgXMfDaCb4PQpnV1pYn8qKKGC3BaVioUqSXe6qS1QOGrV+mZMAOdh0BaPsJ+HwQ1A="
bucket: "lto-explorer-v2"
region: eu-west-1
skip_cleanup: true
detect_encoding: true
local_dir: dist
on:
tags: true