File tree Expand file tree Collapse file tree 2 files changed +61
-23
lines changed
Expand file tree Collapse file tree 2 files changed +61
-23
lines changed Original file line number Diff line number Diff line change 11name : " CI: Test, Build, and Publish Package to npmjs"
22
33on :
4- release :
5- types : [published]
4+ release :
5+ types : [published]
66
77jobs :
8- build-and-publish :
9- runs-on : ubuntu-latest
10- permissions :
11- contents : read
12- id-token : write
8+ build-and-publish :
9+ runs-on : ubuntu-latest
10+ permissions :
11+ contents : read
12+ id-token : write
1313
14- steps :
15- - uses : actions/checkout@v4
14+ steps :
15+ - uses : actions/checkout@v4
1616
17- - uses : actions/setup-node@v4
18- with :
19- node-version : " 20.x"
20- registry-url : " https://registry.npmjs.org"
17+ - uses : actions/setup-node@v4
18+ with :
19+ node-version : " 20.x"
20+ registry-url : " https://registry.npmjs.org"
2121
22- - name : Install dependencies
23- run : npm ci
22+ - name : Install dependencies
23+ run : npm ci
2424
25- - name : Run tests
26- run : npm test
25+ - name : Run tests
26+ run : npm test
2727
28- - name : Build package
29- run : npm run build
28+ - name : Build package
29+ run : npm run build
3030
31- - name : Publish to npm
32- run : npm publish --provenance --access public
33- env :
34- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
31+ - name : Publish to npm
32+ run : npm publish --provenance --access public
33+ env :
34+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1+ # Test package across all maintained/active/current versions of Node.js
2+
3+ name : " CI: Test (Node.js)"
4+
5+ on :
6+ push :
7+ branches :
8+ - " main"
9+ pull_request :
10+
11+ concurrency :
12+ group : node-build-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+
19+ strategy :
20+ fail-fast : false
21+ matrix :
22+ node-version : [20, 22, 24, 25]
23+
24+ steps :
25+ - name : Checkout repository
26+ uses : actions/checkout@v4
27+
28+ - name : Setup Node.js
29+ uses : actions/setup-node@v4
30+ with :
31+ node-version : ${{ matrix.node-version }}
32+ cache : npm
33+
34+ - name : Install dependencies
35+ run : npm ci
36+
37+ - name : Test
38+ run : npm test
You can’t perform that action at this time.
0 commit comments