Skip to content

Commit 60e25c3

Browse files
committed
Fix
1 parent 793fc58 commit 60e25c3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/get-supported-node-versions.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,16 @@ jobs:
1818
- name: Get supported Node.js versions
1919
id: get_versions
2020
run: |
21+
# Look for versions that are:
22+
# - Currently supported
23+
# - That are LTS
24+
# - Within LTS date range (i.e. not future LTS)
2125
NODE_VERSIONS=$(curl --silent https://raw.githubusercontent.com/nodejs/Release/main/schedule.json | jq --compact-output '
2226
def today: now | strftime("%Y-%m-%d");
2327
to_entries
24-
| map(select(.value.end > today))
28+
| map(select(.value.end > today and .value.lts != null and .value.lts < today))
2529
| [.[0].key, .[-1].key]
30+
| unique
2631
')
2732
2833
echo "node-versions=${NODE_VERSIONS}" >> ${GITHUB_OUTPUT}

0 commit comments

Comments
 (0)