Skip to content

Commit 96458ce

Browse files
committed
Update actions workflow
1 parent 3d8f2a5 commit 96458ce

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

.github/workflows/release-publish.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ concurrency:
1616
jobs:
1717
publish:
1818
runs-on: ubuntu-latest
19+
env:
20+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1921
steps:
2022
- uses: actions/checkout@v4
2123
with:
@@ -51,32 +53,18 @@ jobs:
5153
fi
5254
5355
- name: Debug npm auth and context
54-
env:
55-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5656
run: |
57-
test -n "$NPM_TOKEN" || (echo "NPM_TOKEN is missing" && exit 1)
58-
echo "NPM_TOKEN present"
57+
test -n "$NODE_AUTH_TOKEN" || (echo "NODE_AUTH_TOKEN is missing" && exit 1)
58+
echo "NODE_AUTH_TOKEN present"
5959
npm --version
6060
pnpm --version
6161
node --version
6262
npm config get registry
63-
# whoami will fail if not authenticated; after auth step below it should succeed
63+
npm whoami
64+
npm ping
6465
6566
- run: pnpm test
6667
- run: pnpm run build
6768

68-
- name: Authenticate to npm
69-
env:
70-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
71-
run: |
72-
# Configure auth in user config; token value is not echoed
73-
npm config set //registry.npmjs.org/:_authToken "$NPM_TOKEN" --location=user
74-
# Sanity checks (should succeed now)
75-
npm whoami
76-
npm ping
77-
7869
- name: Publish
79-
env:
80-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
81-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
8270
run: pnpm publish --access public --provenance --no-git-checks --tag next

0 commit comments

Comments
 (0)