This repository has been archived by the owner on Dec 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
58 lines (55 loc) · 1.85 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
language: node_js
dist: xenial
sudo: required
stages:
- name: build-test
if: tag =~ /^(?!release\/).*/
- name: release
if: tag =~ /^release\/(major|minor|patch)$/
jobs:
include:
# Test that it builds correctly
###############################
- stage: build-test
name: build-test
services:
- docker
script:
- docker-compose build
# Deploy stage
# - code below is common between DAppNode packages
##################################################
- stage: release
name: release
services:
- docker
script:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker version
- npm install -g @dappnode/dappnodesdk
- docker-compose build
- "TYPE=${TRAVIS_TAG##*/}"
- "[ ! '$TYPE' = 'release' ] || TYPE='patch'"
- dappnodesdk publish ${TYPE} -p infura -a ${DEV}
node_js:
- "10.15.3"
before_deploy:
- wget https://raw.githubusercontent.com/dappnode/DAppNode/master/scripts/before_deploy.sh
- source before_deploy.sh
deploy:
provider: releases
prerelease: true
api_key: "$GITHUB_TOKEN"
file_glob: true
# $RELEASE_VERSION is exported on before_deploy.sh
file: build_${RELEASE_VERSION}/*
skip_cleanup: true
# $TRAVIS_TAG is exported on before_deploy.sh
name: "$TRAVIS_TAG"
body: "# Changelog"
on:
tags: true
condition: "$TRAVIS_TAG = release || $TRAVIS_TAG = release/patch || $TRAVIS_TAG = release/minor || $TRAVIS_TAG = release/major"