Skip to content

Commit e3ee3c4

Browse files
author
Denis Bardadym
committed
Update publish to use trusted publishers
1 parent 0be3826 commit e3ee3c4

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

.github/workflows/deploy.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
1-
name: Node.js Package
1+
name: Node.js Package Publish
2+
3+
# https://docs.npmjs.com/trusted-publishers
4+
25
on:
36
push:
47
tags:
58
- v*
9+
10+
permissions:
11+
id-token: write # Required for OIDC
12+
contents: read
13+
614
jobs:
715
build:
816
runs-on: ubuntu-latest
917
steps:
10-
- uses: actions/checkout@v4
11-
# Setup .npmrc file to publish to npm
12-
- uses: actions/setup-node@v4
13-
with:
14-
node-version: '20.x'
15-
registry-url: 'https://registry.npmjs.org'
16-
- run: npm ci --ignore-scripts
17-
- run: npm run build
18-
- run: npm test
19-
- run: npm publish --ignore-scripts
20-
env:
21-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
18+
- uses: actions/checkout@v4
19+
# Setup .npmrc file to publish to npm
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: "24.x"
23+
registry-url: "https://registry.npmjs.org"
24+
25+
- name: Update npm
26+
run: npm install -g npm@latest
27+
28+
- run: npm ci --ignore-scripts
29+
- run: npm run build
30+
- run: npm test
31+
- run: npm publish --ignore-scripts

0 commit comments

Comments
 (0)