forked from psi-4ward/psitransfer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (39 loc) · 886 Bytes
/
.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
language: node_js
node_js: 14
script:
- (cd app && npm ci && npm run build)
- npm ci
before_deploy:
- if [ -n "$TRAVIS_TAG" ] ; then npm version --git-tag-version=false ${TRAVIS_TAG//v/} ; fi
- >
tar -czf psitransfer-$TRAVIS_TAG.tar.gz \
LICENSE \
README.md \
Dockerfile \
.dockerignore \
app.js \
cli.js \
config.js \
package.json \
package-lock.json \
docs \
lib \
lang \
plugins \
public
# npm deploy
- >
if [ -n "$TRAVIS_TAG" ] ; then
mkdir _pkg; cd _pkg; tar xzf ../psitransfer-$TRAVIS_TAG.tar.gz ;
npm set //registry.npmjs.org/:_authToken $NPM_API_TOKEN ;
npm publish;
cd .. ;
fi
deploy:
provider: releases
token: $GH_TOKEN
overwrite: true
file: $TRAVIS_BUILD_DIR/psitransfer-$TRAVIS_TAG.tar.gz
skip_cleanup: true
on:
tags: true