Add hasChangesets output (#102)

This commit is contained in:
Mateusz Burzyński
2021-08-19 08:32:25 +02:00
committed by GitHub
parent c291823920
commit c3d88279fd
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -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");