Skip to content

Commit

Permalink
Merge pull request #6 from Updater/fix-npm-publish
Browse files Browse the repository at this point in the history
fix: exporting `publish` as an array doesn't work
  • Loading branch information
pmowrer authored Dec 7, 2017
2 parents 6fd9248 + 24c4bf1 commit 4d6a4c7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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)]),
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
12 changes: 11 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 4d6a4c7

Please sign in to comment.