semantic-release / semantic-release/git

Cannot update package.json

Open
#352 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
339
Forks
75
Avg merge
5h 15m
Merged PRs (30d)
6

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the .releaserc configuration and compare the @semantic-release/git assets setting with the existing changelog.md behavior. Verify the release configuration against package.json and confirm that a release updates both package.json and changelog.md.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, javascript
Domain
release
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.