From 293f304841c99c35ffc91313c7face4019c9872a Mon Sep 17 00:00:00 2001 From: GCHQDeveloper581 <63102987+GCHQDeveloper581@users.noreply.github.com> Date: Wed, 11 Feb 2026 09:36:43 +0000 Subject: [PATCH] Separate npm publish out into separate job and run with Node 24.5 (#2188) Enables trusted publishing of npm package, which requires Node >= 22.14 and npm >= 11.5.1 (npm 11.5.1 is bundled with node 24.5) main build cannot currently be done with 24.5 due to minor incompatibilities in the codebase. --- .github/workflows/releases.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index f3417164f..81fd7385e 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -18,7 +18,6 @@ env: jobs: main: permissions: - id-token: write packages: write contents: write runs-on: ubuntu-latest @@ -96,5 +95,20 @@ jobs: file_glob: true body: "See the [CHANGELOG](https://github.com/gchq/CyberChef/blob/master/CHANGELOG.md) and [commit messages](https://github.com/gchq/CyberChef/commits/master) for details." + npm-publish: + permissions: + id-token: write + contents: read + needs: main + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Set node version + uses: actions/setup-node@v6 + with: + node-version: ^24.5 + registry-url: "https://registry.npmjs.org" + - name: Publish to NPM run: npm publish