Skip to content

Commit 61f6308

Browse files
committedMar 5, 2020
Use travis to deploy future releases
1 parent 87c214f commit 61f6308

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed
 

‎.travis.yml

+36-35
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
11
language: node_js
22

33
services:
4-
- docker
4+
- docker
55

66
env:
7-
- LINUX_CXX=g++-4.8
7+
- LINUX_CXX=g++-4.8
88

99
os:
10-
- linux
11-
- osx
10+
- linux
11+
- osx
1212

1313
node_js:
14-
- "10"
15-
- "11"
16-
- "12"
17-
- "13"
14+
- '10'
15+
- '11'
16+
- '12'
17+
- '13'
1818

1919
addons:
2020
apt:
2121
sources:
22-
- ubuntu-toolchain-r-test
22+
- ubuntu-toolchain-r-test
2323
packages:
24-
- g++-4.8
25-
- bc
24+
- g++-4.8
25+
- bc
2626

2727
before_install:
28-
- echo Building for Node $TRAVIS_NODE_VERSION
29-
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=$LINUX_CXX; $CXX --version; fi;
30-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then c++ --version; fi;
31-
- npm install -g npm@latest
28+
- echo Building for Node $TRAVIS_NODE_VERSION
29+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export CXX=$LINUX_CXX; $CXX --version;
30+
fi;
31+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then c++ --version; fi;
32+
- npm install -g npm@latest
3233

3334
install: true
3435

3536
script:
36-
- npm test
37-
- ./node_modules/.bin/node-pre-gyp configure
38-
- ./node_modules/.bin/node-pre-gyp build
39-
- ./node_modules/.bin/node-pre-gyp package
40-
- |
41-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]
42-
then
43-
docker run -w /src --entrypoint /bin/sh -v`pwd`:/src "node:${TRAVIS_NODE_VERSION}-alpine" test_alpine.sh
44-
fi
45-
46-
47-
after_success:
48-
- ls
49-
- |
50-
if [[ $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-\w)? ]]
51-
then
52-
echo "Publishing"
53-
npm install node-pre-gyp-github@1.4.3
54-
./node_modules/.bin/node-pre-gyp-github publish --release
55-
fi
37+
- npm test
38+
- "./node_modules/.bin/node-pre-gyp configure"
39+
- "./node_modules/.bin/node-pre-gyp build"
40+
- "./node_modules/.bin/node-pre-gyp package"
41+
- |
42+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]
43+
then
44+
docker run -w /src --entrypoint /bin/sh -v`pwd`:/src "node:${TRAVIS_NODE_VERSION}-alpine" test_alpine.sh
45+
fi
46+
47+
deploy:
48+
provider: releases
49+
api_key:
50+
secure: j4gQ+m02izaw56EOd0gEStHAjCRfSCkohDWvpABiPzh1YPM9MvfEMSIvzzjV/0oMqi3Sy7eGyFv47EgQHZvouW0I8BIUzxuTCE5wP8z2SjABXCa/rz4WTppTc9d9ABq8JSdz80JxEwjmuwnYeMwWgOd7sT/VDiMxLYaXj0JWO7w=
51+
file_glob: true
52+
file: build/stage/*/*
53+
on:
54+
repo: kelektiv/node.bcrypt.js
55+
tags: true
56+
condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-\w)?

0 commit comments

Comments
 (0)
Please sign in to comment.