mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Added cwd input option (#134)
* feat: add cwd for projects that not in the root directory * docs: add cwd to README * reword the added log * tweak changeset Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
This commit is contained in:
co-authored by
Mateusz Burzyński
parent
5c0997b25e
commit
1ed9bc24b7
+7
-1
@@ -14,7 +14,7 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
|
||||
return;
|
||||
}
|
||||
|
||||
let setupGitUser = core.getBooleanInput('setupGitUser');
|
||||
let setupGitUser = core.getBooleanInput("setupGitUser");
|
||||
|
||||
if (setupGitUser) {
|
||||
console.log("setting git user");
|
||||
@@ -27,6 +27,12 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
|
||||
`machine github.com\nlogin github-actions[bot]\npassword ${githubToken}`
|
||||
);
|
||||
|
||||
const inputCwd = core.getInput("cwd");
|
||||
if (inputCwd) {
|
||||
console.log("changing directory to the one given as the input");
|
||||
process.chdir(inputCwd);
|
||||
}
|
||||
|
||||
let { changesets } = await readChangesetState();
|
||||
|
||||
let publishScript = core.getInput("publish");
|
||||
|
||||
Reference in New Issue
Block a user