Skip to content

Fix npm publish - Run "npm ci" and "npm run node" under node 18 then switch to node 24.5#2192

Merged
GCHQDeveloper581 merged 1 commit intogchq:masterfrom
GCHQDeveloper581:fix-npm-release-again
Feb 12, 2026
Merged

Fix npm publish - Run "npm ci" and "npm run node" under node 18 then switch to node 24.5#2192
GCHQDeveloper581 merged 1 commit intogchq:masterfrom
GCHQDeveloper581:fix-npm-release-again

Conversation

@GCHQDeveloper581
Copy link
Copy Markdown
Contributor

Package on npm.js doesn't contain the machine-generated files because they weren't built as part of the publish.

Currently there's a problem because we cant run "npm run node" on Node >20 due to incompatibilities
But npm publish has to be run under Node >=24.5 in order to use trusted publishing

This PR works around this by initially working with Node 18 and then switching to Node 24.5 just before the publish is done.

Use of multiple actions/setup-node instances within a single job has been tested to work elsewhere with a separate action on a throwaway branch.

@GCHQDeveloper581 GCHQDeveloper581 changed the title Fix npm publish - Run "npm ci" and "npm run node" under node 18 then switch to node 24.… Fix npm publish - Run "npm ci" and "npm run node" under node 18 then switch to node 24.5 Feb 11, 2026
@GCHQDeveloper581 GCHQDeveloper581 merged commit 7ba58cd into gchq:master Feb 12, 2026
2 checks passed
@GCHQDeveloper581 GCHQDeveloper581 deleted the fix-npm-release-again branch February 12, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants