1414
1515jobs :
1616 build :
17+ name : Build and Test (${{ matrix.os }}, node-${{ matrix.node-version }})
1718 runs-on : ${{ matrix.os }}
1819
1920 strategy :
2021 fail-fast : false
2122 matrix :
2223 os : [ubuntu-latest]
23- node : [18]
24+ node-version : [18, 20, 22 ]
2425
2526 steps :
2627 - name : Checkout
2728 uses : actions/checkout@v4
2829 with :
2930 persist-credentials : false
3031
31- - name : Use Node.js ${{ matrix.node }}
32+ - name : Use Node.js ${{ matrix.node-version }}
3233 uses : actions/setup-node@v4
3334 with :
34- node-version : ${{ matrix.node }}
35+ node-version : ${{ matrix.node-version }}
3536 registry-url : ' https://registry.npmjs.org'
3637
3738 - name : Build
@@ -50,25 +51,27 @@ jobs:
5051 NODE_OPTIONS : " --max_old_space_size=4096"
5152
5253 publish-next :
54+ name : Publish to npm (next) (${{ matrix.os }})
5355 needs : build
5456 if : github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'eclipse-cdt-cloud/timeline-chart'
5557
56- runs-on : ubuntu-latest
58+ runs-on : ${{ matrix.os }}
5759
5860 strategy :
5961 matrix :
60- node : [18]
62+ os : [ubuntu-latest]
63+ node-version : [20]
6164
6265 steps :
6366 - name : Checkout
6467 uses : actions/checkout@v4
6568 with :
6669 persist-credentials : false
6770
68- - name : Use Node.js ${{ matrix.node }}
71+ - name : Use Node.js ${{ matrix.node-version }}
6972 uses : actions/setup-node@v4
7073 with :
71- node-version : ${{ matrix.node }}
74+ node-version : ${{ matrix.node-version }}
7275 registry-url : ' https://registry.npmjs.org'
7376
7477 - name : Pre-Publish
@@ -91,21 +94,23 @@ jobs:
9194 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
9295
9396 publish-latest :
97+ name : Publish to npm (latest) (${{ matrix.os }})
9498 needs : build
9599 if : github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'eclipse-cdt-cloud/timeline-chart'
96- runs-on : ubuntu-latest
100+ runs-on : ${{ matrix.os }}
97101 strategy :
98102 matrix :
99- node : [18]
103+ os : [ubuntu-latest]
104+ node-version : [20]
100105 steps :
101106 - name : Checkout
102107 uses : actions/checkout@v3
103108 with :
104109 persist-credentials : false
105- - name : Use Node.js ${{ matrix.node }}
110+ - name : Use Node.js ${{ matrix.node-version }}
106111 uses : actions/setup-node@v3
107112 with :
108- node-version : ${{ matrix.node }}
113+ node-version : ${{ matrix.node-version }}
109114 registry-url : ' https://registry.npmjs.org'
110115 - name : Pre-Publish
111116 shell : bash
0 commit comments