1010 workflow_dispatch :
1111 release :
1212 types :
13- - published
13+ - published
14+ schedule :
15+ - cron : ' 0 4 * * *' # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule
16+
1417
1518jobs :
1619 build :
20+ name : Build and Test (${{ matrix.os }}, node-${{ matrix.node-version }})
1721 runs-on : ${{ matrix.os }}
1822
1923 strategy :
2024 fail-fast : false
2125 matrix :
2226 os : [ubuntu-latest]
23- node : [18]
27+ node-version : [18, 20, 22 ]
2428
2529 steps :
2630 - name : Checkout
2731 uses : actions/checkout@v4
2832 with :
2933 persist-credentials : false
3034
31- - name : Use Node.js ${{ matrix.node }}
35+ - name : Use Node.js ${{ matrix.node-version }}
3236 uses : actions/setup-node@v4
3337 with :
34- node-version : ${{ matrix.node }}
38+ node-version : ${{ matrix.node-version }}
3539 registry-url : ' https://registry.npmjs.org'
3640
3741 - name : Build
@@ -50,25 +54,27 @@ jobs:
5054 NODE_OPTIONS : " --max_old_space_size=4096"
5155
5256 publish-next :
57+ name : Publish to npm (next) (${{ matrix.os }})
5358 needs : build
5459 if : github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/timeline-chart'
5560
56- runs-on : ubuntu-latest
61+ runs-on : ${{ matrix.os }}
5762
5863 strategy :
5964 matrix :
60- node : [18]
65+ os : [ubuntu-latest]
66+ node-version : [20]
6167
6268 steps :
6369 - name : Checkout
6470 uses : actions/checkout@v4
6571 with :
6672 persist-credentials : false
6773
68- - name : Use Node.js ${{ matrix.node }}
74+ - name : Use Node.js ${{ matrix.node-version }}
6975 uses : actions/setup-node@v4
7076 with :
71- node-version : ${{ matrix.node }}
77+ node-version : ${{ matrix.node-version }}
7278 registry-url : ' https://registry.npmjs.org'
7379
7480 - name : Pre-Publish
@@ -91,21 +97,23 @@ jobs:
9197 NODE_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }} # The variable name comes from here: https://github.com/actions/setup-node/blob/70b9252472eee7495c93bb1588261539c3c2b98d/src/authutil.ts#L48
9298
9399 publish-latest :
100+ name : Publish to npm (latest) (${{ matrix.os }})
94101 needs : build
95102 if : github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'eclipse-cdt-cloud/timeline-chart'
96- runs-on : ubuntu-latest
103+ runs-on : ${{ matrix.os }}
97104 strategy :
98105 matrix :
99- node : [18]
106+ os : [ubuntu-latest]
107+ node-version : [20]
100108 steps :
101109 - name : Checkout
102110 uses : actions/checkout@v3
103111 with :
104112 persist-credentials : false
105- - name : Use Node.js ${{ matrix.node }}
113+ - name : Use Node.js ${{ matrix.node-version }}
106114 uses : actions/setup-node@v3
107115 with :
108- node-version : ${{ matrix.node }}
116+ node-version : ${{ matrix.node-version }}
109117 registry-url : ' https://registry.npmjs.org'
110118 - name : Pre-Publish
111119 shell : bash
0 commit comments