@@ -11,21 +11,17 @@ jobs:
1111 runs-on : ubuntu-latest
1212
1313 steps :
14- # Step 1: Checkout the repository
1514 - name : Checkout repository
1615 uses : actions/checkout@v3
1716
18- # Step 2: Set up Node.js environment
1917 - name : Setup Node.js
2018 uses : actions/setup-node@v3
2119 with :
2220 node-version : 18
2321
24- # Step 3: Install dependencies
2522 - name : Install dependencies
2623 run : npm install @octokit/rest
2724
28- # Step 4: Check README for outdated release URLs
2925 - name : Check README for outdated release URLs
3026 run : |
3127 node --input-type=module <<'EOF'
@@ -61,19 +57,16 @@ jobs:
6157 const latestReleaseUrl = latestRelease.html_url;
6258
6359 console.log(` ➤ Latest Release URL: ${latestReleaseUrl}`);
64- console.log(
65- currentReleaseUrl === latestReleaseUrl
66- ? `✅ ${pluginName} is up-to-date.`
67- : `❌ ${pluginName} is outdated. Please update the URL to ${latestReleaseUrl}.`
68- );
69-
70- if (currentReleaseUrl !== latestReleaseUrl) {
60+ if (currentReleaseUrl === latestReleaseUrl) {
61+ console.log(`✅ ${pluginName} is up-to-date.`);
62+ } else {
63+ console.log(`❌ ${pluginName} is outdated. Update the URL to ${latestReleaseUrl}`);
64+ console.log(`::warning file=README.md::${pluginName} is outdated. Update the URL to ${latestReleaseUrl}`);
7165 allCorrect = false;
7266 }
7367 } catch (error) {
74- console.error(
75- `⚠️ Failed to fetch the latest release for ${pluginName}. Error: ${error.message}`
76- );
68+ console.error(`⚠️ Failed to fetch latest release for ${pluginName}. Error: ${error.message}`);
69+ console.log(`::error file=README.md::Failed to fetch latest release for ${pluginName}: ${error.message}`);
7770 allCorrect = false;
7871 }
7972 }
0 commit comments