Add npm/github deployment

This commit is contained in:
Michael Vines 2018-08-22 14:46:09 -07:00
parent 1ba4492054
commit 86e32a3f31
4 changed files with 37 additions and 12 deletions

View File

@ -7,16 +7,33 @@ before_script: npm run lint
script: npm run test
after_success: npm run coveralls
branches:
only:
- master
before_deploy:
- cp -r doc solana_web3_api-$TRAVIS_BRANCH
- tar zcf solana_web3_api-$TRAVIS_BRANCH.tgz solana_web3_api-$TRAVIS_BRANCH
- cp lib/index.js solana_web3.min.js
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
local-dir: doc
on:
branch: master
node_js: "lts/*"
- provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: doc
on:
branch: master
node_js: "lts/*"
- provider: releases
skip-cleanup: true
file:
- solana_web3.min.js
- solana_web3_api-$TRAVIS_BRANCH.tgz
api_key: $GITHUB_TOKEN
on:
tags: true
node_js: "lts/*"
- provider: npm
skip-cleanup: true
email: $NPM_EMAIL_ADDRESS
api_key: $NPM_AUTH_TOKEN
on:
tags: true
node_js: "lts/*"

View File

@ -16,6 +16,9 @@
"bugs": {
"url": "http://github.com/solana-labs/solana-web3.js.git/issues"
},
"publishConfig": {
"access": "public"
},
"main": "lib/index.js",
"scripts": {
"clean": "rimraf ./coverage ./lib",

View File

@ -0,0 +1,5 @@
Releasing a new version of this module is accomplished by running:
```
$ npm version patch
$ git push origin --tags
```

View File

@ -11,7 +11,7 @@ const config = {
external: ['react', 'react-dom'],
output: {
format: 'umd',
name: 'npmPackageES6Boilerplate',
name: 'solana_web3',
},
plugins: [