Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot update package.json #352

Open
softshape opened this issue May 15, 2022 · 3 comments
Open

Cannot update package.json #352

softshape opened this issue May 15, 2022 · 3 comments

Comments

@softshape
Copy link

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?

@pmarchini
Copy link
Contributor

Hey there, I think that the problem here it's missing semantic-release/npm plugin.

I suggest to check this answer.

@budarin
Copy link

budarin commented Jun 23, 2022

try to install @semantic-release/git

@Walidoux
Copy link

Hello there,

I must say it's duplicate of this issue : semantic-release/semantic-release#1593 (comment)
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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants