Repository navigation
Description
[v2] Nested Changesets projects cannot be used: working-directory is invalid on uses steps
Summary
changesets/action@v2.0.0 removed the cwd input in #659. The associated changeset says to use the step-level working-directory option instead.
However, GitHub Actions only supports working-directory for run steps, not uses steps. This leaves no supported way to run the v2 action when the Changesets project root is a subdirectory of the repository.
The action then uses process.cwd() as its project directory:
https://github.com/changesets/action/blob/v2.0.0/src/index.ts#L13-L16
Minimal repository
.
├── .github/workflows/release.yml
├── packages/example/package.json
└── tools/release
├── .changeset/config.json
├── .changeset/fuzzy-cats-smile.md
└── package.json
tools/release/package.json is a private workspace root with @changesets/cli@^3.0.0 and ../../packages/example as a workspace.
The Changesets CLI works from that directory and calculates the expected release:
$ cd tools/release
$ ./node_modules/.bin/changeset status --output status.json
🦋 changeset v3.0.0
# status.json contains example-package 1.0.0 -> 1.0.1Reproduction A: documented replacement is invalid workflow syntax
- run: npm install --ignore-scripts
working-directory: tools/release
- uses: changesets/action@v2.0.0
working-directory: tools/releaseStrict workflow validation fails:
$ act --strict --validate --dryrun -W .github/workflows/release.yml
Unknown Property working-directoryGitHub documents jobs.<job_id>.steps[*].working-directory as an option for run steps:
Reproduction B: schema-valid workflow runs the action at repository root
Removing working-directory from the uses step makes the workflow valid:
- run: npm install --ignore-scripts
working-directory: tools/release
- uses: changesets/action@v2.0.0Running it produces:
$ act workflow_dispatch --bind --container-architecture linux/amd64 \
-P ubuntu-latest=catthehacker/ubuntu:act-latest \
-W .github/workflows/release-root.yml
::error::Error: No package.json could be found upwards from directory <repository-root>The nested install succeeds before the action is invoked. The error occurs because the action uses the repository root as cwd, where this fixture intentionally has no package.json.
Expected behavior
There should be a supported way to specify a nested Changesets project root, as there was with the v1 cwd input.
Restoring a cwd input (or adding a project-directory input) and resolving it against github.workspace would address this. A regression test should cover a repository whose .changeset, package manager manifest, and Changesets CLI installation are all below the repository root.
Versions
changesets/action:v2.0.0@changesets/cli:3.0.0act:0.2.89- Node:
24.19.0
Related history
- How to configure this action when project is not in the root folder? #133 / Option to specify working directory in GitHub Actions #265 originally established the need for nested-project support.
- Remove cwd option #659 removed
cwdand introduced this regression.
Activity
bluwy commentedon Aug 12, 2026
Ah didn't notice this only worked for runs. I suppose we should add it back for now