File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches :
66 - master
77 tags :
8- - ' v*' # optional: publish on version tags like v1.0.0
8+ - ' v*'
99
1010jobs :
1111 publish :
1616 - name : Checkout code
1717 uses : actions/checkout@v4
1818
19- - name : Setup Node.js 18
19+ - name : Setup Node.js
2020 uses : actions/setup-node@v4
2121 with :
2222 node-version : 18
@@ -33,13 +33,15 @@ jobs:
3333 - name : Build package
3434 run : pnpm build
3535
36- # - name: Run tests (optional)
37- # run: pnpm test
38-
3936 - name : Authenticate to npm
40- run : npm config set //registry.npmjs.org/:_authToken=${NPM_TOKEN}
4137 env :
38+ # Required so setup-node writes correct .npmrc
39+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
4240 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
41+ run : |
42+ echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> ~/.npmrc
4343
4444 - name : Publish to npm
45- run : pnpm publish --access public --no-git-checks
45+ env :
46+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
47+ run : pnpm publish --access public --no-git-checks
You can’t perform that action at this time.
0 commit comments