mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
Fix release announcement script (redemption arc) (#9835)
This commit is contained in:
parent
8281ebddaa
commit
7ed24b90d0
1 changed files with 2 additions and 5 deletions
7
.github/scripts/announce.mjs
vendored
7
.github/scripts/announce.mjs
vendored
|
@ -132,7 +132,7 @@ async function generateMessage() {
|
|||
}
|
||||
|
||||
if (message.length < 2000) {
|
||||
console.log(message);
|
||||
return message;
|
||||
} else {
|
||||
const { name, version, url } = packages.find((pkg) => pkg.name === 'astro') ?? packages[0];
|
||||
message = `${emoji} Some ${descriptor} ${pluralize(verb)}\n\n`;
|
||||
|
@ -158,11 +158,8 @@ async function generateMessage() {
|
|||
}
|
||||
|
||||
async function run() {
|
||||
if (!process.env.DISCORD_WEBHOOK) {
|
||||
console.error('No DISCORD_WEBHOOK variable detected!');
|
||||
process.exit(1);
|
||||
}
|
||||
const content = await generateMessage();
|
||||
console.log(content);
|
||||
setOutput('DISCORD_MESSAGE', content);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue