From 4a4373705833bdfd8da47fa9679e86e08b39cd54 Mon Sep 17 00:00:00 2001 From: Patrick Mowrer Date: Wed, 6 Dec 2017 19:16:58 -0500 Subject: [PATCH 1/2] fix: exporting `publish` as an array doesn't work --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 55eb375..d92d524 100644 --- a/index.js +++ b/index.js @@ -5,6 +5,7 @@ const releaseNotesGenerator = require('@semantic-release/release-notes-generator const { publish: publishGithub } = require('@semantic-release/github'); const { publish: publishNpm } = require('@semantic-release/npm'); +const pipeline = require('semantic-release/lib/plugins/pipeline'); const gitTag = require('./src/git-tag'); const overrideOption = (key, wrapperFn) => pluginFn => async (pluginConfig, options) => { @@ -25,5 +26,5 @@ const withGitTag = overrideOption('nextRelease', async nextRelease => module.exports = { analyzeCommits: withPackageCommits(commitAnalyzer), generateNotes: compose(withGitTag, withVersion, withPackageCommits)(releaseNotesGenerator), - publish: [withGitTag(publishNpm), withGitTag(publishGithub)], + publish: pipeline([withGitTag(publishNpm), withGitTag(publishGithub)]), }; From 24c4bf1b09ddacb9ac002fd0a52175b096a2bfe6 Mon Sep 17 00:00:00 2001 From: Patrick Mowrer Date: Wed, 6 Dec 2017 19:21:10 -0500 Subject: [PATCH 2/2] chore: install `semantic-release-github-pr` --- .travis.yml | 3 ++- package.json | 3 ++- yarn.lock | 12 +++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1625a6d..96aa0e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,5 @@ before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash - export PATH="$HOME/.yarn/bin:$PATH" after_success: - - "[[ $TRAVIS_BRANCH = 'master' ]] && npx semantic-release --debug || npx semantic-release --dry-run" + - npx semantic-release-github-pr + - npx semantic-release --debug \ No newline at end of file diff --git a/package.json b/package.json index 9490b25..6f3293e 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "read-pkg": "^3.0.0" }, "devDependencies": { - "semantic-release": "^11.0.0" + "semantic-release": "^11.0.0", + "semantic-release-github-pr": "^1.1.1" } } diff --git a/yarn.lock b/yarn.lock index 0b6cc69..8ca725a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -659,7 +659,7 @@ git-url-parse@^7.0.1: dependencies: git-up "^2.0.0" -github@^12.0.0, github@^12.0.5: +github@^12.0.0, github@^12.0.5, github@^12.1.0: version "12.1.0" resolved "https://registry.yarnpkg.com/github/-/github-12.1.0.tgz#f2a2dcbd441178155942257491a4bc08bf661dd7" dependencies: @@ -1510,6 +1510,16 @@ safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" +semantic-release-github-pr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/semantic-release-github-pr/-/semantic-release-github-pr-1.1.1.tgz#b77d447ef7af4d42d1fda337945162c94df22755" + dependencies: + "@semantic-release/github" "^2.0.0" + execa "^0.8.0" + github "^12.1.0" + parse-github-url "^1.0.1" + read-pkg "^3.0.0" + semantic-release@^11.0.0: version "11.0.1" resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-11.0.1.tgz#9103a9d43968db864cf9f725c2a3b4d8ab0cdc47"