semantic-release / semantic-release/git

Adding package.json to git assets does not result in the file being pushed back to repo

Open
#321 6 comments 4 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

Current behavior

The following configuration results in the changelog being pushed back to the target branch, but not package.json.

prepare:
  - path: '@semantic-release/changelog'
  - path: '@semantic-release/git'
    message: 'RELEASE: ${nextRelease.version}'
    assets: ['CHANGELOG.md', 'package.json']

The CI logs indicate the new version is being written to package.json, and I'm hoping to get that pushed back upstream so the version shown in the repo is correct.

Expected behavior

package.json should be pushed to the repo along with CHANGELOG.md.

Environment

Also check out the release commit, it has CHANGELOG.md changes but not package.json: https://gitlab.com/james-kontralto/semantic-release-test/-/commit/fcfe8f8311ff5443ecb4b7bd2bc9f37a7fb0e80b

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 linked .releaserc.yml configuration, CI logs, and release commit, then trace how the @semantic-release/git plugin handles the configured assets. Done means a release commit includes package.json alongside CHANGELOG.md when both are listed in assets.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.