Skip to content

Commit 8e29a38

Browse files
authored
Update build.yml
1 parent 19146c4 commit 8e29a38

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
- master
1111
- 'release/**'
1212

13+
permissions:
14+
id-token: write
15+
contents: read
16+
1317
jobs:
1418
build:
1519
runs-on: ubuntu-latest
@@ -19,7 +23,7 @@ jobs:
1923
- name: Set up Node.js
2024
uses: actions/setup-node@v4
2125
with:
22-
node-version: 18
26+
node-version: 20
2327
registry-url: 'https://registry.npmjs.org'
2428

2529
- name: Install packages
@@ -30,9 +34,9 @@ jobs:
3034
run: yarn lint && 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)