Skip to content

Commit b9509f2

Browse files
committed
fix ci
1 parent 1cbcb00 commit b9509f2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,24 @@ jobs:
2828
- name: Install Node.js
2929
uses: actions/setup-node@v4
3030
with:
31-
node-version: 20
31+
node-version: 24
3232
cache: "pnpm"
3333
cache-dependency-path: pnpm-lock.yaml
3434
registry-url: https://registry.npmjs.org/
3535

3636
- name: Install dependencies
3737
run: pnpm install --frozen-lockfile
3838

39+
- name: Check trusted publishing prerequisites
40+
run: |
41+
node --version
42+
npm --version
43+
if [ -n "${NODE_AUTH_TOKEN:-}" ] || [ -n "${NPM_TOKEN:-}" ]; then
44+
echo "NODE_AUTH_TOKEN/NPM_TOKEN is set. Remove token auth to use npm trusted publishing."
45+
exit 1
46+
fi
47+
3948
- name: Build and publish to npm
4049
run: |
4150
pnpm build
4251
npm publish --access public --provenance
43-
env:
44-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)