Skip to content

Commit b856d35

Browse files
Vaibhav RajputVaibhav Rajput
authored andcommitted
fix(ci): fix publish job failure and Node.js deprecation warnings
- Add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 env to silence deprecation warnings - Skip publish when NPM_TOKEN secret is not set - Bump publish job to Node 22 - Version already on npm correctly skips publish (was failing before)
1 parent 5b375a7 commit b856d35

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [main]
88

9+
env:
10+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
11+
912
jobs:
1013
test:
1114
runs-on: ubuntu-latest
@@ -39,7 +42,7 @@ jobs:
3942

4043
- uses: actions/setup-node@v4
4144
with:
42-
node-version: 20
45+
node-version: 22
4346
registry-url: https://registry.npmjs.org
4447
cache: npm
4548

@@ -58,7 +61,7 @@ jobs:
5861
fi
5962
6063
- name: Publish
61-
if: steps.check.outputs.exists == 'false'
64+
if: steps.check.outputs.exists == 'false' && secrets.NPM_TOKEN != ''
6265
run: npm publish --provenance --access public
6366
env:
6467
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)