Skip to content

Commit f71e419

Browse files
authored
Update build.yml
1 parent 6c47d2b commit f71e419

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@ on:
1010
- master
1111
- 'release/**'
1212

13+
permissions:
14+
id-token: write
15+
contents: read
16+
1317
jobs:
1418
nodejs:
15-
runs-on: ubuntu-20.04
19+
runs-on: ubuntu-latest
1620

1721
steps:
18-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
1923
- name: Set up Node.js
20-
uses: actions/setup-node@v1
24+
uses: actions/setup-node@v4
2125
with:
22-
node-version: 14
26+
node-version: 20
2327
registry-url: 'https://registry.npmjs.org'
2428

2529
- name: Install packages
@@ -30,9 +34,9 @@ jobs:
3034
run: yarn build && yarn test
3135
- name: Deploy to NPM
3236
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name == 'push'
33-
run: npm publish
34-
env:
35-
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
37+
run: |
38+
npm install -g npm@latest
39+
npm publish
3640
3741
- name: After build
3842
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name == 'push'

0 commit comments

Comments
 (0)