git
git copied to clipboard
Cannot update package.json
Here's my .releaserc file which updates changelog.md on each build:
[
"@semantic-release/release-notes-generator", {
"preset": "conventionalcommits"
},
],
[
"@semantic-release/git",
{
"message": "chore: Release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
I want to update version number in package.json also. But as soon as I add it to the config:
"@semantic-release/git",
{
"assets": ["package.json"],
"message": "chore: Release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
it stops to update changelog.md (and doesn't update package.json anyway).
What is the correct way to update both changelog.md and package.json?
Hey there, I think that the problem here it's missing semantic-release/npm plugin.
I suggest to check this answer.
try to install @semantic-release/git
Hello there,
I must say it's duplicate of this issue : https://github.com/semantic-release/semantic-release/issues/1593#issuecomment-656871587
The package.json
's version of your project isn't committed because you're missing @semantic-release/npm
in your configuration, you'll need to add it into your dependencies though.
I agree, it's a little confusing because most of us thought it had to do with releasing a package in npmjs, which is not the case.
Hope the issue is resolved :+1: