|
4 | 4 | name: Node.js
|
5 | 5 | on:
|
6 | 6 | push:
|
7 |
| - branches: [ master ] |
| 7 | + branches: [master] |
8 | 8 | pull_request:
|
9 |
| - branches: [ master ] |
| 9 | + branches: [master] |
10 | 10 | jobs:
|
11 | 11 | test:
|
12 | 12 | runs-on: ubuntu-latest
|
13 | 13 | strategy:
|
14 | 14 | matrix:
|
15 | 15 | node-version: [16.x, 18.x, 20.x, 22.x]
|
16 | 16 | steps:
|
17 |
| - - uses: actions/checkout@v4 |
18 |
| - - name: Use Node.js ${{ matrix.node-version }} |
19 |
| - uses: actions/setup-node@v4 |
20 |
| - with: |
21 |
| - node-version: ${{ matrix.node-version }} |
22 |
| - - run: npm install |
23 |
| - - run: npm run test |
| 17 | + - uses: actions/checkout@v4 |
| 18 | + - name: Use Node.js ${{ matrix.node-version }} |
| 19 | + uses: actions/setup-node@v4 |
| 20 | + with: |
| 21 | + node-version: ${{ matrix.node-version }} |
| 22 | + - run: npm install |
| 23 | + - run: npm run test |
24 | 24 | test_legacy:
|
25 | 25 | runs-on: ubuntu-latest
|
26 | 26 | strategy:
|
27 | 27 | matrix:
|
28 | 28 | node-version: [14.x]
|
29 | 29 | steps:
|
30 |
| - - uses: actions/checkout@v4 |
31 |
| - - name: Use Node.js ${{ matrix.node-version }} |
32 |
| - uses: actions/setup-node@v4 |
33 |
| - with: |
34 |
| - node-version: ${{ matrix.node-version }} |
35 |
| - - run: | |
36 |
| - cwd=`pwd` |
37 |
| - for pkg in packages/*/package.json; do |
38 |
| - cd $cwd/`dirname $pkg` |
39 |
| - npm install |
40 |
| - npm run test:legacy; |
41 |
| - done |
| 30 | + - uses: actions/checkout@v4 |
| 31 | + - name: Use Node.js ${{ matrix.node-version }} |
| 32 | + uses: actions/setup-node@v4 |
| 33 | + with: |
| 34 | + node-version: ${{ matrix.node-version }} |
| 35 | + - run: | |
| 36 | + cwd=`pwd` |
| 37 | + for pkg in packages/*/package.json; do |
| 38 | + cd $cwd/`dirname $pkg` |
| 39 | + npm install |
| 40 | + npm run test:legacy; |
| 41 | + done |
42 | 42 | publish:
|
43 | 43 | needs: [test, test_legacy]
|
44 | 44 | runs-on: ubuntu-latest
|
45 | 45 | steps:
|
46 |
| - - uses: actions/checkout@v4 |
47 |
| - with: |
48 |
| - fetch-depth: 0 |
49 |
| - - uses: actions/setup-node@v4 |
50 |
| - with: |
51 |
| - node-version: '20.x' |
52 |
| - registry-url: 'https://registry.npmjs.org' |
53 |
| - - run: npm install |
54 |
| - - run: npm run publish |
55 |
| - env: |
56 |
| - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 46 | + - uses: actions/checkout@v4 |
| 47 | + with: |
| 48 | + fetch-depth: 0 |
| 49 | + - uses: actions/setup-node@v4 |
| 50 | + with: |
| 51 | + node-version: "20.x" |
| 52 | + registry-url: "https://registry.npmjs.org" |
| 53 | + - run: npm ci |
| 54 | + - run: npm run publish |
| 55 | + env: |
| 56 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
0 commit comments