mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Add hasChangesets output (#102)
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+4
-3
@@ -14,9 +14,6 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
|
||||
return;
|
||||
}
|
||||
|
||||
core.setOutput("published", "false");
|
||||
core.setOutput("publishedPackages", "[]");
|
||||
|
||||
console.log("setting git user");
|
||||
await gitUtils.setupUser();
|
||||
|
||||
@@ -32,6 +29,10 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
|
||||
let hasChangesets = changesets.length !== 0;
|
||||
let hasPublishScript = !!publishScript;
|
||||
|
||||
core.setOutput("published", "false");
|
||||
core.setOutput("publishedPackages", "[]");
|
||||
core.setOutput("hasChangesets", String(hasChangesets));
|
||||
|
||||
switch (true) {
|
||||
case !hasChangesets && !hasPublishScript:
|
||||
console.log("No changesets found");
|
||||
|
||||
Reference in New Issue
Block a user