Skip to content

Commit b44da3e

Browse files
committed
use latest npm publication method with github
1 parent ac5ac92 commit b44da3e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ jobs:
7575
name: Assemble & Publish
7676
needs: build
7777
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
7883
steps:
7984
- name: Checkout
8085
uses: actions/checkout@v4
@@ -94,14 +99,12 @@ jobs:
9499
- name: Setup Node (for publish)
95100
uses: actions/setup-node@v4
96101
with:
97-
node-version: '22.21.1'
102+
node-version: '22'
98103
registry-url: 'https://registry.npmjs.org'
99104

100105
- name: Preview npm tarball
101106
run: npm pack --dry-run
102107

103108
- name: Publish to npm
104109
if: startsWith(github.ref, 'refs/tags/v')
105-
env:
106-
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
107110
run: npm publish

0 commit comments

Comments
 (0)