Skip to content

Commit 5cf6ebc

Browse files
committed
npm trusted publishing
1 parent dc72d40 commit 5cf6ebc

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/prebuild-and-publish.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
tags:
66
- "v*"
77

8+
permissions:
9+
contents: read
10+
id-token: write
11+
812
jobs:
913
build-prebuilds:
1014
name: Build prebuilds (Windows & Linux)
@@ -94,16 +98,15 @@ jobs:
9498
name: Create release and publish
9599
runs-on: ubuntu-latest
96100
needs: build-prebuilds
97-
permissions:
98-
contents: write
99-
id-token: write
100101
steps:
101102
- uses: actions/checkout@v4
102103
- name: Setup Node
103104
uses: actions/setup-node@v4
104105
with:
105-
node-version: '20'
106-
registry-url: 'https://registry.npmjs.org'
106+
node-version: "24"
107+
registry-url: "https://registry.npmjs.org"
108+
- name: Install deps
109+
run: npm ci
107110
- name: Download artifacts
108111
uses: actions/download-artifact@v4
109112
with:
@@ -118,4 +121,4 @@ jobs:
118121
env:
119122
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
120123
- name: Publish to npm
121-
run: npm publish --access public --provenance --ignore-scripts
124+
run: npm publish

0 commit comments

Comments
 (0)