Skip to content

Commit

Permalink
ci: add package name to the PR artifacts (#7724)
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb authored Jan 10, 2025
1 parent 54a8475 commit 998d230
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/prereleases/3-comment.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,25 @@ function buildAdditionalArtifactReport(pkg) {
const name = pkg.json.name;
const type = pkg.json["workers-sdk"].type;
const url = getPrereleaseArtifactUrl(name);
if (type === "cli") {
return `\`\`\`sh\nnpx ${url} --no-auto-update\n\`\`\``;
} else if (type === "extension") {
return `\`\`\`sh\nwget ${url} -O ./${name}.${pkg.json.version}.vsix && code --install-extension ./${name}.${pkg.json.version}.vsix\n\`\`\``;
} else {
return `\`\`\`sh\nnpm install ${url}\n\`\`\``;
let command;

switch (type) {
case "cli":
command = `npx ${url} --no-auto-update`;
break;
case "extension":
command = `wget ${url} -O ./${name}.${pkg.json.version}.vsix && code --install-extension ./${name}.${pkg.json.version}.vsix`;
break;
default:
command = `npm install ${url}`;
}

return `
${name}:
\`\`\`sh
${command}
\`\`\`
`;
}

/**
Expand Down

0 comments on commit 998d230

Please sign in to comment.