Skip to content

Commit aa26e8a

Browse files
committed
Fix npm publish steps
1 parent 01d4385 commit aa26e8a

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/CI.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ jobs:
312312
with:
313313
node-version: 20
314314
cache: yarn
315+
registry-url: 'https://registry.npmjs.org'
316+
- name: Update npm
317+
run: npm install -g npm@11
315318
- name: Install dependencies
316319
run: yarn install
317320
- name: Download all artifacts
@@ -325,18 +328,14 @@ jobs:
325328
shell: bash
326329
- name: Publish
327330
run: |
328-
npm config set provenance true
329331
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
330332
then
331-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
332-
npm publish --access public
333+
npm publish --access public --provenance
333334
elif git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+";
334335
then
335-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
336-
npm publish --tag next --access public
336+
npm publish --access public --provenance --tag next
337337
else
338338
echo "Not a release, skipping publish"
339339
fi
340340
env:
341341
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
342-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)