Skip to content

Commit 6554f27

Browse files
authored
update: adjust npm publish workflow
Signed-off-by: Lucas Morais Rodrigues <76886832+1Lucas1apk@users.noreply.github.com>
1 parent 0ce0cd4 commit 6554f27

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/github-packages.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@ name: Node.js Package
22

33
on:
44
release:
5-
types: [created]
5+
types: [published]
66

77
jobs:
88
build:
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
1013
steps:
1114
- uses: actions/checkout@v4
1215
- uses: actions/setup-node@v4
1316
with:
1417
node-version: 20
18+
registry-url: https://registry.npmjs.org
19+
cache: npm
20+
- run: npm install -g npm@latest
1521
- run: npm ci
1622

1723
publish-gpr:
@@ -20,13 +26,14 @@ jobs:
2026
permissions:
2127
contents: read
2228
packages: write
29+
id-token: write
2330
steps:
2431
- uses: actions/checkout@v4
2532
- uses: actions/setup-node@v4
2633
with:
2734
node-version: 20
28-
registry-url: https://npm.pkg.github.com/
35+
registry-url: https://registry.npmjs.org
36+
cache: npm
37+
- run: npm install -g npm@latest
2938
- run: npm ci
30-
- run: npm publish
31-
env:
32-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
39+
- run: npm publish --access public

0 commit comments

Comments
 (0)