#35559·nx

nx release: per-group changelog files not staged into release commit when using --groups with fixed projectsRelationship

Author: edward-montoya-endava-gbgCreated May 4, 2026Updated Sep 17, 2026
Labelstype: bugscope: releasepriority: medium

Current Behavior

When running the top-level nx release command with --groups=… (no --projects= flag) on a config that uses fixed release groups with a per-group changelog.file, the generated changelog files are written to disk but not staged into the release commit. Only the package.json updates from the version phase end up in the release commit; the CHANGELOG.md files for each affected group remain dirty in the working tree and are discarded when CI tears down.

The log shows two related symptoms:

  1. Per-project iteration inside fixed groups. For a fixed group with N projects sharing one changelog.file, the log emits N Generating an entry in <file> for <group>@v<version> lines. The first iteration writes; subsequent iterations log NOTE: There was no diff detected for the changelog entry.

  2. Final summary incorrectly reports no changes. After several files have been UPDATEd / CREATEd in the per-group iteration, the run still prints:

    NX   No changes detected for changelogs
    
    No changes were detected for any changelog files, so no changelog entries will be generated.

    The release commit then contains only the version-phase package.json writes; the changelog files never make it into the index.

Expected Behavior

When nx release writes one or more per-group changelog/<group>/CHANGELOG.md files during the changelog phase, those files should be staged into the same release commit as the package.json version bumps.

Steps to Reproduce

  1. Initialize an Nx workspace with two libraries that match a wildcard, e.g. domain-feature-a and providers-feature-a.

  2. Configure a fixed release group sharing a per-group changelog file. Minimal nx.json:

    json
    {
      "release": {
        "git": { "commitMessage": "chore: updated version [no ci]" },
        "version": { "conventionalCommits": true },
        "changelog": {
          "workspaceChangelog": false,
          "projectChangelogs": true
        },
        "groups": {
          "feature-a": {
            "projects": ["*-feature-a"],
            "projectsRelationship": "fixed",
            "releaseTag": { "pattern": "feature-a@v{version}" },
            "changelog": {
              "file": "changelog/feature-a/CHANGELOG.md",
              "createRelease": "github"
            },
            "version": { "conventionalCommits": true }
          }
        }
      }
    }
  3. Tag a starting version: git tag [email protected].

  4. Add a conventional commit that affects one of the projects in the group:

    fix(feature-a): trigger a patch bump
  5. Run the top-level release command (no --projects=):

    nx release --groups=feature-a --skip-publish
  6. Inspect the resulting release commit:

    bash
    git show HEAD --stat

Observed:

  • The console log shows UPDATE changelog/feature-a/CHANGELOG.md once (with the new entry diff), then a second Generating an entry in changelog/feature-a/CHANGELOG.md for [email protected] followed by NOTE: There was no diff detected for the changelog entry.
  • The final summary prints [NX] No changes detected for changelogs / No changelog entries will be generated.
  • git show HEAD --stat lists only the two package.json files. changelog/feature-a/CHANGELOG.md is dirty in the working tree but not in the commit.

Nx Report

(output of `nx report` from the affected workspace)

Node             : 20.x
OS               : linux x64
Native Target    : x86_64-linux
nx               : 22.5.2
@nx/js           : 22.5.2
@nx/workspace    : 22.5.2

Failure Logs

NX   Staging changed files with git              # version phase only — package.json files

NX   Generating an entry in changelog/feature-a/CHANGELOG.md for [email protected]
UPDATE changelog/feature-a/CHANGELOG.md
+ ## 1.0.1 (...)
+
+ ###  Fixes
+
+ - **feature-a:** trigger a patch bump

NX   Generating an entry in changelog/feature-a/CHANGELOG.md for [email protected]
NOTE: There was no diff detected for the changelog entry. Maybe you intended to pass alternative git references via --from and --to?

NX   No changes detected for changelogs

No changes were detected for any changelog files, so no changelog entries will be generated.

NX   Committing changes with git
NX   Tagging commit with git
NX   Pushing to git remote "origin"

Resulting commit:

$ git show HEAD --stat
chore: updated version [no ci]

 packages/domain-feature-a/package.json    | 2 +-
 packages/providers-feature-a/package.json | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Package Manager Version

bun 1.3.10 (also reproduced with npm; not package-manager-specific.)

Operating System

  • macOS
  • Linux
  • Windows
  • Other

Additional Information

Related prior reports:

  • #33268 — @nx/release: duplicated projects (manifests when using --projects=).
  • #34851 — adds a new Set(...) dedupe, but only inside the args.projects?.length code branch in packages/nx/src/command-line/release/changelog.ts. The --groups= (default) branch does not pass through that dedupe, which is consistent with the duplicate per-project iteration we still observe on 22.5.2 and on master.