Add: npm publish to travis

This commit is contained in:
Christoph Wiechert
2020-04-14 11:27:02 +02:00
parent 1a02f9a339
commit 041684408b
5 changed files with 16 additions and 1 deletions

View File

@@ -14,12 +14,21 @@ before_deploy:
Dockerfile \
.dockerignore \
app.js \
cli.js \
config.js \
package.json \
package-lock.json \
docs \
lib \
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

0
app.js Normal file → Executable file
View File

2
cli.js Executable file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env node
require('./app');

View File

@@ -1,6 +1,6 @@
{
"name": "psitransfer",
"version": "1.3.2",
"version": "0.0.0",
"description": "Simple open source self-hosted file sharing solution",
"keywords": [
"share",
@@ -26,6 +26,9 @@
"tusboy": "^1.1.1",
"uuid": "^3.3.2"
},
"bin":{
"psitransfer": "cli.js"
},
"devDependencies": {},
"scripts": {
"start": "NODE_ENV=production node app.js",

View File

@@ -27,6 +27,7 @@ tar -czf _releases/psitransfer-$NAME.tar.gz --transform "s~^~psitransfer-$NAME/~
Dockerfile \
.dockerignore \
app.js \
cli.js \
config.js \
package.json \
package-lock.json \