Skip to content

Commit f01f825

Browse files
committed
Update github workflows
1 parent 2d5388a commit f01f825

File tree

2 files changed

+38
-32
lines changed

2 files changed

+38
-32
lines changed

.github/workflows/nodejs.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
name: Node CI
2-
3-
on: [push, pull_request]
2+
on:
3+
- push
4+
- pull_request
45
jobs:
56
test:
6-
name: v20 @ ubuntu-latest
7+
name: v${{ matrix.node }} @ ubuntu-latest
78
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
node:
12+
- 18
13+
- 20
814
steps:
9-
- uses: actions/checkout@v3
10-
- name: Use Node.js ${{ matrix.node }}
11-
uses: actions/setup-node@v3
12-
with:
13-
node-version: 20
14-
- run: npm install
15-
- run: npm run build --if-present
16-
- run: npm test
17-
- run: npm run lint --if-present
15+
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
16+
- name: Use Node.js ${{ matrix.node }}
17+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
18+
with:
19+
node-version: ${{ matrix.node }}
20+
- run: npm install
21+
- run: npm run build --if-present
22+
- run: npm test
23+
- run: npm run lint --if-present

.github/workflows/publish-npm.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: Publish Package to npm
22
on:
3-
release:
4-
types: [created]
3+
release:
4+
types: [created]
55
jobs:
6-
build:
7-
runs-on: ubuntu-latest
8-
permissions:
9-
contents: read
10-
id-token: write
11-
steps:
12-
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
13-
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
14-
with:
15-
node-version: 20
16-
registry-url: 'https://registry.npmjs.org'
17-
cache: npm
18-
- run: npm install -g npm
19-
- run: npm ci
20-
- run: npm run build
21-
- run: npm publish --provenance --access public
22-
env:
23-
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
id-token: write
11+
steps:
12+
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
13+
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
14+
with:
15+
node-version: 20
16+
registry-url: 'https://registry.npmjs.org'
17+
cache: npm
18+
- run: npm install -g npm
19+
- run: npm ci
20+
- run: npm run build
21+
- run: npm publish --provenance --access public
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)