diff --git a/.github/actions/update-version-durability/action.yml b/.github/actions/update-version-durability/action.yml index 803158ae1a2..84af3f8911e 100644 --- a/.github/actions/update-version-durability/action.yml +++ b/.github/actions/update-version-durability/action.yml @@ -2,6 +2,10 @@ name: Update Version Durability description: Update Version Durability page on Document360 inputs: + LTS_VERSIONS: + required: true + description: Comma separated list of LTS versions + type: string GH_TOKEN: required: true description: GitHub API Token diff --git a/.github/actions/update-version-durability/index.js b/.github/actions/update-version-durability/index.js index b05b9e9ca76..2065ac66608 100644 --- a/.github/actions/update-version-durability/index.js +++ b/.github/actions/update-version-durability/index.js @@ -12,6 +12,7 @@ import { Octokit } from '@octokit/rest'; const D360_TOKEN = core.getInput('D360_TOKEN'); const D360_ARTICLE_ID = core.getInput('D360_ARTICLE_ID'); const PUBLISH = core.getInput('PUBLISH') === 'true'; +const LTS_VERSIONS = (core.getInput('LTS_VERSIONS') || '7.10').split(',').map((v) => v.trim()); const octokit = new Octokit({ auth: core.getInput('GH_TOKEN'), @@ -79,6 +80,11 @@ async function generateTable({ owner, repo } = {}) { continue; } + // Mark LTS + if (LTS_VERSIONS.includes(`${currentVersion.major}.${currentVersion.minor}`)) { + release.lts = true; + } + index++; } @@ -97,7 +103,7 @@ async function generateTable({ owner, repo } = {}) { minorDate.setDate(1); supportDateStart = minorDate; supportDate = new Date(minorDate); - supportDate.setMonth(supportDate.getMonth() + (lts ? 6 : 6)); + supportDate.setMonth(supportDate.getMonth() + (lts ? 9 : 6)); releaseData.push({ release: { @@ -145,7 +151,7 @@ async function generateTable({ owner, repo } = {}) { const endOfLife = !release.extendedSupport ? 'TBD' : release.extendedSupport.end.toLocaleString('en', { month: 'short', year: "numeric" }); - const link = `${release.version} (${latestPatch.version})`; + const link = `${release.version}${release.lts ? " LTS" : ""} (${latestPatch.version})`; text.push( '