Skip to content

Commit 643b1a9

Browse files
committed
chore: small updates to the script output
1 parent 530e3a8 commit 643b1a9

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

.github/workflows/pkg.pr.new.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,12 @@ jobs:
2727
with:
2828
github-token: ${{ secrets.GITHUB_TOKEN }}
2929
script: |
30-
const fs = require('fs');
31-
const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
3230
33-
const packages = output.packages
34-
.map((t) => `\`\`\`
35-
pnpm add ${t.url}
36-
\`\`\``)
37-
.join('\n');
3831
3932
const body = (number)=>`## \`pkg.pr.new\` for ${context.sha.substring(0, 7)}
40-
${packages}
33+
\`\`\`
34+
pnpm add https://pkg.pr.new/svelte@${number}
35+
\`\`\`
4136
4237
[Open Playground](https://svelte.dev/playground?version=pr-${number})
4338
`;
@@ -87,7 +82,7 @@ jobs:
8782
console.log('\nPublished Packages:');
8883
console.log(packages);
8984
console.log('\nPlayground URL:');
90-
console.log(`\nhttps://svelte.dev/playground?version=commit-${context.sha}`)
85+
console.log(`\nhttps://svelte.dev/playground?version=commit-${context.sha.substring(0, 7)}`)
9186
console.log('\n' + '='.repeat(50));
9287
}
9388

0 commit comments

Comments
 (0)