Skip to content

Commit 2648a95

Browse files
committed
fix: publish setting
1 parent 8c42629 commit 2648a95

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Release
22

33
on:
44
push:
5-
branches: [master]
65
tags:
76
- 'v*.*.*'
87

@@ -61,10 +60,13 @@ jobs:
6160
run: |
6261
node -e "const fs=require('fs'); const p=JSON.parse(fs.readFileSync('package.json','utf8')); p.version='${{ steps.get_info.outputs.VERSION }}'; fs.writeFileSync('package.json', JSON.stringify(p,null,2)+'\n');"
6362
64-
- name: Publish to npm with provenance
63+
- name: Configure npm authentication
64+
run: |
65+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
66+
chmod 600 ~/.npmrc
67+
68+
- name: Publish to npm
6569
run: npm publish --provenance --access public
66-
env:
67-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6870

6971
- name: Create GitHub Release
7072
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)