Skip to content

Commit d118b1b

Browse files
authored
ci(npm): use trusted publishing for npm packages (#199)
1 parent 886229a commit d118b1b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14-
strategy:
15-
max-parallel: 24
1614
steps:
1715
- uses: actions/checkout@v4
1816
- name: Setup Node

.github/workflows/publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Node.js Package
22
on:
33
release:
44
types: [created]
5+
permissions:
6+
id-token: write # Required for OIDC
7+
contents: read
58
jobs:
69
build:
710
runs-on: ubuntu-latest
@@ -12,11 +15,12 @@ jobs:
1215
with:
1316
node-version: 22.x
1417
registry-url: "https://registry.npmjs.org"
18+
# Ensure npm 11.5.1 or later is installed
19+
- name: Update npm
20+
run: npm install -g npm@latest
1521
- name: Install dependencies 📦
1622
run: npm ci
1723
- name: Build lib 🛠️
1824
run: npm run build
1925
- name: Publish NPM lib 📋
2026
run: npm publish
21-
env:
22-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)