From 3a94d58c80d7e518e82dc40c01ff721d7d509871 Mon Sep 17 00:00:00 2001 From: johnjbarton Date: Fri, 17 Jan 2020 09:10:11 -0800 Subject: [PATCH] chore(travis): Activate semantic-release on node-12 test success --- .travis.yml | 9 ++++++++- release.config.js | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 release.config.js diff --git a/.travis.yml b/.travis.yml index 47202894d..bf0619e0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,4 +43,11 @@ before_script: - 'if [ "$LINT" == "true" ]; then npm run lint; fi' script: - - npm run travis \ No newline at end of file + - npm run travis + +after_success: + # run automated release process with semantic-release + - if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "push" && "$TRAVIS_NODE_VERSION" == "12" ]]; then + npm i --no-save semantic-release@15 @semantic-release/changelog@3 @semantic-release/git@7; + semantic-release; + fi; \ No newline at end of file diff --git a/release.config.js b/release.config.js new file mode 100644 index 000000000..4ff9f489d --- /dev/null +++ b/release.config.js @@ -0,0 +1,21 @@ +module.exports = { + debug: true, + branch: 'master', + verifyConditions: [ + '@semantic-release/changelog', + '@semantic-release/npm', + '@semantic-release/github' + ], + prepare: [ + '@semantic-release/changelog', + '@semantic-release/npm', + '@semantic-release/git' + ], + publish: [ + '@semantic-release/npm', + '@semantic-release/github' + ], + success: [ + '@semantic-release/github' + ] +}