Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
Added .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eduadiez committed May 14, 2019
1 parent e7a7fc1 commit 813d94e
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
language: node_js
dist: trusty
dist: xenial
sudo: required

# ########################
# How to trigger a release
#
# Push a tag to origin:
# - "release" (= patch)
# - "release/patch"
# - "release/minor"
# - "release/major"
# ########################

stages:
- name: build-test
if: tag != "release"
if: tag !~ /^release\/(major|minor|patch)$/
- name: release
if: tag = "release"
if: tag =~ /^release\/(major|minor|patch)$/

jobs:
include:
Expand All @@ -29,15 +39,18 @@ jobs:
script:
- npm install -g @dappnode/dappnodesdk
- docker-compose build
- TYPE=${PUBLISH:-patch}
- dappnodesdk publish ${TYPE} -p infura
node_js: lts/*
- "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/dac9b3a964aaac93bf704344be0531b2e819d0e1/scripts/before_deploy.sh
- wget https://raw.githubusercontent.com/dappnode/DAppNode/master/scripts/before_deploy.sh
- source before_deploy.sh
deploy:
provider: releases
prerelease: true
overwrite: true
api_key: "$GITHUB_TOKEN"
file_glob: true
# $RELEASE_VERSION is exported on before_deploy.sh
Expand All @@ -47,9 +60,8 @@ jobs:
name: "$TRAVIS_TAG"
body: "# Changelog"
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ ^release*$"
condition: "$TRAVIS_TAG = release || $TRAVIS_TAG = release/patch || $TRAVIS_TAG = release/minor || $TRAVIS_TAG = release/major"
after_deploy:
- wget https://raw.githubusercontent.com/dappnode/DAppNode/master/scripts/after_deploy.sh
- source after_deploy.sh

0 comments on commit 813d94e

Please sign in to comment.