Skip to content

Commit 6e53539

Browse files
committed
fixing npm publication
1 parent b44da3e commit 6e53539

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
tags: ['v*'] # publish when you push a tag like v1.2.3
66
workflow_dispatch: {}
77

8+
# New publication workflow with OIDC authentication https://docs.npmjs.com/trusted-publishers
9+
# THe Github CI is declared on NPM as a trusted publisher
10+
permissions:
11+
contents: read
12+
id-token: write
13+
814
jobs:
915
build:
1016
name: Build ${{ matrix.os }} / ${{ matrix.arch }}
@@ -41,7 +47,7 @@ jobs:
4147
- name: Setup node using cache (faster)
4248
uses: actions/setup-node@v4
4349
with:
44-
node-version: '22.21.1'
50+
node-version: '22'
4551

4652
- run: npm ci --production
4753

@@ -75,11 +81,6 @@ jobs:
7581
name: Assemble & Publish
7682
needs: build
7783
runs-on: ubuntu-latest
78-
# New publication workflow with OIDC authentication https://docs.npmjs.com/trusted-publishers
79-
# THe Github CI is declared on NPM as a trusted publisher
80-
permissions:
81-
contents: read
82-
id-token: write
8384
steps:
8485
- name: Checkout
8586
uses: actions/checkout@v4
@@ -99,7 +100,8 @@ jobs:
99100
- name: Setup Node (for publish)
100101
uses: actions/setup-node@v4
101102
with:
102-
node-version: '22'
103+
# Required for OIDC authentication
104+
node-version: '24'
103105
registry-url: 'https://registry.npmjs.org'
104106

105107
- name: Preview npm tarball

0 commit comments

Comments
 (0)