forked from dappnode/DAppNodePackage-kovan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (52 loc) · 1.52 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
language: node_js
dist: trusty
sudo: required
stages:
- name: build-test
if: tag != "release"
- name: release
if: tag = "release"
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:
- RELEASE_TYPE=${RELEASE_TYPE:-patch}
- npm install -g @dappnode/dappnodesdk
- docker-compose build
- dappnodesdk publish ${RELEASE_TYPE} -p infura -a $DEV
node_js: lts/*
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:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ ^release*$"
after_deploy:
- wget https://raw.githubusercontent.com/dappnode/DAppNode/master/scripts/after_deploy.sh
- source after_deploy.sh