Skip to content

Commit 950ec5b

Browse files
committed
fix: explicitly define registry/token via custom .npmrc in release action
1 parent 68d2621 commit 950ec5b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
uses: actions/setup-node@v2
2525
with:
2626
node-version: 14
27-
registry-url: 'https://registry.npmjs.org'
2827
# install pnpm and try to reuse cache from ci action by using same cache keys
2928
- name: install pnpm
3029
run: npm i -g pnpm@5
@@ -57,6 +56,13 @@ jobs:
5756
# manually install esbuild because we deactivated postinstall scripts above
5857
run: node node_modules/esbuild/install.js
5958

59+
- name: Creating .npmrc
60+
run: |
61+
cat << EOF > "$HOME/.npmrc"
62+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
63+
EOF
64+
env:
65+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6066
- name: Create Release Pull Request or Publish to npm
6167
id: changesets
6268
uses: changesets/action@master

0 commit comments

Comments
 (0)