From bf2b9775c4acd950d999b7b3780503a1df8a96fa Mon Sep 17 00:00:00 2001 From: bluwy Date: Tue, 23 Jun 2026 09:38:38 +0800 Subject: [PATCH] Remove cwd option --- .changeset/lemon-turtles-itch.md | 5 +++++ action.yml | 3 --- src/index.ts | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .changeset/lemon-turtles-itch.md diff --git a/.changeset/lemon-turtles-itch.md b/.changeset/lemon-turtles-itch.md new file mode 100644 index 00000000..f5b77778 --- /dev/null +++ b/.changeset/lemon-turtles-itch.md @@ -0,0 +1,5 @@ +--- +"@changesets/action": major +--- + +Remove `cwd` option for `changesets/action`. Use the step `working-directory` option instead to change the directory. diff --git a/action.yml b/action.yml index 9f7d3869..8f2ccb18 100644 --- a/action.yml +++ b/action.yml @@ -14,9 +14,6 @@ inputs: version: description: "The command to update version, edit CHANGELOG, read and delete changesets. Default to `changeset version` if not provided" required: false - cwd: - description: Sets the cwd for the node process. Default to `process.cwd()` - required: false commit: description: | The commit message. Default to `Version Packages` diff --git a/src/index.ts b/src/index.ts index 6c4549cd..247e2920 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,8 +19,8 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined; return; } - const cwd = path.resolve(getOptionalInput("cwd") ?? ""); - core.info(`using resolved cwd: ${cwd}`); + // If the user needs to change the cwd, set `working-directory` in the step instead + const cwd = process.cwd(); const octokit = setupOctokit(githubToken); const commitMode = getOptionalInput("commitMode") ?? "git-cli";