From 896a390c156f1876f90c1160defceda959e51dbd Mon Sep 17 00:00:00 2001 From: David Goss Date: Thu, 18 Sep 2025 14:23:32 +0100 Subject: [PATCH] Setup trusted publishing with npm --- .github/workflows/release-npm.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index 3d37cfd..4ea6150 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -4,6 +4,10 @@ on: push: branches: [release/*] +permissions: + id-token: write + contents: read + jobs: publish-npm: name: Publish NPM module @@ -13,12 +17,9 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v5 with: - node-version: '22' + node-version: '24.x' cache: 'npm' - cache-dependency-path: javascript/package-lock.json - - run: npm install-test - working-directory: javascript - - uses: cucumber/action-publish-npm@v1.1.1 - with: - npm-token: ${{ secrets.NPM_TOKEN }} - working-directory: javascript + cache-dependency-path: package-lock.json + registry-url: 'https://registry.npmjs.org' + - run: npm install-ci-test + - run: npm publish