Skip to content

Commit e300ddd

Browse files
committed
u
1 parent 2f224b3 commit e300ddd

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/publish-types.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
uses: actions/setup-node@v6
3737
with:
3838
node-version: 22
39-
registry-url: 'https://registry.npmjs.org'
4039

4140
- name: Install dependencies & generate types
4241
run: |
@@ -53,7 +52,22 @@ jobs:
5352
cd landscape-types
5453
pnpm pkg set version="$VERSION"
5554
55+
- name: Verify npm token
56+
run: |
57+
if [ -z "$NPM_TOKEN" ]; then
58+
echo "::error::NPM_TOKEN secret is empty!"
59+
exit 1
60+
fi
61+
echo "Token starts with: ${NPM_TOKEN:0:8}..."
62+
env:
63+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
64+
5665
- name: Publish to npm
5766
run: |
58-
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
67+
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
68+
cat ~/.npmrc | head -c 50
69+
echo "..."
70+
npm whoami --registry https://registry.npmjs.org || echo "whoami failed"
5971
pnpm --filter @landscape-router/types publish --no-git-checks --access public
72+
env:
73+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)