From ad777f066e50eb7e830dd0d30c60625f76753cd9 Mon Sep 17 00:00:00 2001 From: johnjbarton Date: Fri, 14 Feb 2020 11:53:35 -0800 Subject: [PATCH] chore(travis): activate semantic-release on node-12 test success (#3423) --- .travis.yml | 9 ++++++++- release.config.js | 22 ++++++++++++++++++++++ 2 files changed, 30 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..595c922e2 --- /dev/null +++ b/release.config.js @@ -0,0 +1,22 @@ +module.exports = { + // Add logging for releases until we are fully confident of the release solution. + 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' + ] +}