diff --git a/.travis.yml b/.travis.yml index 15b7d85..df32e14 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,10 @@ before_install: - npm install -g npm@latest-2 after_success: - npm run coverage + - 'curl -Lo travis_after_all.py https://git.io/travis_after_all' + - python travis_after_all.py + - 'export $(cat .to_export_back) &> /dev/null' + - npm run semantic-release branches: except: - "/^v\\d+\\.\\d+\\.\\d+$/" diff --git a/package.json b/package.json index 2093bec..e471ba1 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "coveralls": "^2.11.9", "nock": "^8.0.0", "nyc": "^6.4.0", + "semantic-release": "^4.3.5", "xo": "^0.15.0" }, "homepage": "https://github.com/cloudflare/node-cloudflare", @@ -34,8 +35,14 @@ }, "scripts": { "test": "xo && nyc --reporter=lcov -- ava", - "coverage": "cat ./coverage/lcov.info | coveralls" + "coverage": "cat ./coverage/lcov.info | coveralls", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, + "files": [ + "index.js", + "lib", + "test" + ], "xo": { "space": true }