未执行准备步骤
Prepare step isn't being executed
我目前正在尝试设置 semantic-release
以发布 package.json
更新版本和 CHANGELOG
到 npm 和 GitHub。根据我的阅读,这似乎可以使用 @semantic-release/git and @semantic-release/changelog plugins. However, I couldn't make it work with my configs. My package is something like that: (source @ redux-form-input-masks)
(...)
"devDependencies": {
"@semantic-release/changelog": "^1.0.1",
"@semantic-release/git": "^3.0.1",
"semantic-release": "^13.4.1",
(...)
},
"release": {
"debug": true,
"verifyConditions": [
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/github"
],
"prepare": [
"@semantic-release/changelog",
"@semantic-release/npm",
{
"path": "@semantic-release/git",
"assets": [
"package.json",
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"publish": [
"@semantic-release/npm",
"@semantic-release/github"
]
}
(...)
Travis CI 构建日志显示:
[0Ktravis_fold:start:after_success.2
[0Ktravis_time:start:0014f334
[0K$ npx semantic-release
[Semantic release]: Running semantic-release version 13.4.1
[Semantic release]: Load plugin verifyConditions from @semantic-release/changelog
[Semantic release]: Load plugin verifyConditions from @semantic-release/npm
[Semantic release]: Load plugin verifyConditions from @semantic-release/git
[Semantic release]: Load plugin verifyConditions from @semantic-release/github
[Semantic release]: Load plugin analyzeCommits from @semantic-release/commit-analyzer
[Semantic release]: Load plugin generateNotes from @semantic-release/release-notes-generator
[Semantic release]: Load plugin publish from @semantic-release/npm
[Semantic release]: Load plugin publish from @semantic-release/github
[Semantic release]: Run automated release from branch master
[Semantic release]: Call plugin verify-conditions
[Semantic release]: Verify authentication for registry https://registry.npmjs.org/
[Semantic release]: Wrote NPM_TOKEN to .npmrc.
[Semantic release]: Verify GitHub authentication
[Semantic release]: Found git tag v0.3.5 associated with version 0.3.5
[Semantic release]: Found 1 commits since last release
[Semantic release]: Call plugin analyze-commits
[Semantic release]: Analyzing commit: fix: testing semantic-release
[Semantic release]: The release type for the commit is patch
[Semantic release]: Analysis of 1 commits complete: patch release
[Semantic release]: The next release version is 0.3.6
[Semantic release]: Call plugin verify-release
[Semantic release]: Call plugin generateNotes
[Semantic release]: Create tag v0.3.6
[Semantic release]: Call plugin publish
[Semantic release]: Wrote version 0.3.6 to package.json
[Semantic release]: Wrote version 0.3.6 to package-lock.json
[Semantic release]: Publishing version 0.3.6 to npm registry
+ redux-form-input-masks@0.3.6[Semantic release]: Published GitHub release: https://github.com/renato-bohler/redux-form-input-masks/releases/tag/v0.3.6
[Semantic release]: Published release: 0.3.6
travis_time:end:0014f334:start=1519095849162192955,finish=1519095858417255129,duration=9255062174
[0Ktravis_fold:end:after_success.2
这确实在 GitHub 和 npm 上发布了一个新标签和版本,但它不会创建 CHANGELOG.md
(正如我对更新日志插件所期望的那样)并且它不会使用更新版本提交 package.json
(在本例中为 0.3.6 - 正如我对 git 插件的期望)。
我是不是漏掉了什么?
我终于成功了。
问题是 npm i @semantic-release/git --save-dev
会在 3.0.1 版本安装 git 插件,而我正在阅读 API for for version 4.0.0。
我解决了
npm i --save-dev semantic-release@15 @semantic-release/git@4 @semantic-release/changelog@2
我目前正在尝试设置 semantic-release
以发布 package.json
更新版本和 CHANGELOG
到 npm 和 GitHub。根据我的阅读,这似乎可以使用 @semantic-release/git and @semantic-release/changelog plugins. However, I couldn't make it work with my configs. My package is something like that: (source @ redux-form-input-masks)
(...)
"devDependencies": {
"@semantic-release/changelog": "^1.0.1",
"@semantic-release/git": "^3.0.1",
"semantic-release": "^13.4.1",
(...)
},
"release": {
"debug": true,
"verifyConditions": [
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/github"
],
"prepare": [
"@semantic-release/changelog",
"@semantic-release/npm",
{
"path": "@semantic-release/git",
"assets": [
"package.json",
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
"publish": [
"@semantic-release/npm",
"@semantic-release/github"
]
}
(...)
Travis CI 构建日志显示:
[0Ktravis_fold:start:after_success.2
[0Ktravis_time:start:0014f334
[0K$ npx semantic-release
[Semantic release]: Running semantic-release version 13.4.1
[Semantic release]: Load plugin verifyConditions from @semantic-release/changelog
[Semantic release]: Load plugin verifyConditions from @semantic-release/npm
[Semantic release]: Load plugin verifyConditions from @semantic-release/git
[Semantic release]: Load plugin verifyConditions from @semantic-release/github
[Semantic release]: Load plugin analyzeCommits from @semantic-release/commit-analyzer
[Semantic release]: Load plugin generateNotes from @semantic-release/release-notes-generator
[Semantic release]: Load plugin publish from @semantic-release/npm
[Semantic release]: Load plugin publish from @semantic-release/github
[Semantic release]: Run automated release from branch master
[Semantic release]: Call plugin verify-conditions
[Semantic release]: Verify authentication for registry https://registry.npmjs.org/
[Semantic release]: Wrote NPM_TOKEN to .npmrc.
[Semantic release]: Verify GitHub authentication
[Semantic release]: Found git tag v0.3.5 associated with version 0.3.5
[Semantic release]: Found 1 commits since last release
[Semantic release]: Call plugin analyze-commits
[Semantic release]: Analyzing commit: fix: testing semantic-release
[Semantic release]: The release type for the commit is patch
[Semantic release]: Analysis of 1 commits complete: patch release
[Semantic release]: The next release version is 0.3.6
[Semantic release]: Call plugin verify-release
[Semantic release]: Call plugin generateNotes
[Semantic release]: Create tag v0.3.6
[Semantic release]: Call plugin publish
[Semantic release]: Wrote version 0.3.6 to package.json
[Semantic release]: Wrote version 0.3.6 to package-lock.json
[Semantic release]: Publishing version 0.3.6 to npm registry
+ redux-form-input-masks@0.3.6[Semantic release]: Published GitHub release: https://github.com/renato-bohler/redux-form-input-masks/releases/tag/v0.3.6
[Semantic release]: Published release: 0.3.6
travis_time:end:0014f334:start=1519095849162192955,finish=1519095858417255129,duration=9255062174
[0Ktravis_fold:end:after_success.2
这确实在 GitHub 和 npm 上发布了一个新标签和版本,但它不会创建 CHANGELOG.md
(正如我对更新日志插件所期望的那样)并且它不会使用更新版本提交 package.json
(在本例中为 0.3.6 - 正如我对 git 插件的期望)。
我是不是漏掉了什么?
我终于成功了。
问题是 npm i @semantic-release/git --save-dev
会在 3.0.1 版本安装 git 插件,而我正在阅读 API for for version 4.0.0。
我解决了
npm i --save-dev semantic-release@15 @semantic-release/git@4 @semantic-release/changelog@2