From 05dab12b7c9814c195e1d93b1e9659aa00f49731 Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Wed, 30 Mar 2022 20:29:51 -0400 Subject: [PATCH] releases: simplify discord announcements, and link to the right page --- .../releases/announce-release/index.js | 40 +------------------ 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/.github/workflows/scripts/releases/announce-release/index.js b/.github/workflows/scripts/releases/announce-release/index.js index 4ea9ce3609..23671ac669 100644 --- a/.github/workflows/scripts/releases/announce-release/index.js +++ b/.github/workflows/scripts/releases/announce-release/index.js @@ -8,53 +8,17 @@ if (!releaseInfo.prerelease) { process.exit(0); } -const assets = releaseInfo.assets; -let windowsAssetLinks = ""; -let linuxAssetLinks = ""; - -for (var i = 0; i < assets.length; i++) { - let asset = assets[i]; - if (asset.name.includes("symbols")) { - continue; - } - if (asset.name.includes("windows")) { - let friendlyName = asset.name; - try { - friendlyName = asset.name.split("windows-")[1].split(".7z")[0].replace("-", " "); - } catch (e) { - console.log(e); - } - windowsAssetLinks += `- [${friendlyName}](${asset.browser_download_url})\n` - } else if (asset.name.includes("linux")) { - let friendlyName = asset.name; - try { - friendlyName = asset.name.split("linux-")[1].split(".AppImage")[0].replace("-", " "); - } catch (e) { - console.log(e); - } - linuxAssetLinks += `- [${friendlyName}](${asset.browser_download_url})\n` - } -} - // Publish Webhook const embed = new MessageEmbed() .setColor('#FF8000') .setTitle('New PCSX2 Nightly Build Available!') + .setDescription("To download the latest or previous builds, [visit the official downloads page](https://pcsx2.net/downloads/).") .addFields( { name: 'Version', value: releaseInfo.tag_name, inline: true }, - { name: 'Release Link', value: `[Github Release](${releaseInfo.html_url})`, inline: true }, { name: 'Installation Steps', value: '[See Here](https://github.com/PCSX2/pcsx2/wiki/Nightly-Build-Usage-Guide)', inline: true }, - { name: 'Included Changes', value: releaseInfo.body, inline: false }, - { name: 'Previous Builds', value: "[See Here](https://pcsx2.github.io/downloads.html#nightly-anchor)", inline: false } + { name: 'Included Changes', value: releaseInfo.body, inline: false } ); -if (windowsAssetLinks != "") { - embed.addField('Windows Downloads', windowsAssetLinks, false); -} -if (linuxAssetLinks != "") { - embed.addField('Linux Downloads', linuxAssetLinks, false); -} - const webhookClient = new WebhookClient({ url: process.env.DISCORD_BUILD_WEBHOOK }); await webhookClient.send({ embeds: [embed],