Skip to content

Update Node.js Versions #9397

Update Node.js Versions

Update Node.js Versions #9397

Workflow file for this run

name: Update Node.js Versions
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
schedule:
# Run every two hours
- cron: '0 0/2 * * *'
workflow_dispatch:
jobs:
collect-version-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install NVM
run: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
- name: Download latest Node.js versions
run: wget https://nodejs.org/download/release/index.json -O node-versions.json
- run: |
./scripts/nvm-iterator.sh
- uses: actions/upload-artifact@v3
with:
name: version-jsons
path: jsons/*.json
merge-and-release:
runs-on: ubuntu-latest
needs: [collect-version-data]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/download-artifact@v3
with:
path: collected-json
- run: yarn install
- run: find ./collected-json -name '*.json' | xargs yarn merge
- run: cat index.json
- name: Publish from main if necessary
if: github.ref == 'refs/heads/main'
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: yarn run release