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
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -3
View File
@@ -14,9 +14,6 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
return; return;
} }
core.setOutput("published", "false");
core.setOutput("publishedPackages", "[]");
console.log("setting git user"); console.log("setting git user");
await gitUtils.setupUser(); await gitUtils.setupUser();
@@ -32,6 +29,10 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
let hasChangesets = changesets.length !== 0; let hasChangesets = changesets.length !== 0;
let hasPublishScript = !!publishScript; let hasPublishScript = !!publishScript;
core.setOutput("published", "false");
core.setOutput("publishedPackages", "[]");
core.setOutput("hasChangesets", String(hasChangesets));
switch (true) { switch (true) {
case !hasChangesets && !hasPublishScript: case !hasChangesets && !hasPublishScript:
console.log("No changesets found"); console.log("No changesets found");