Skip to content

Commit 2bdb7e6

Browse files
committed
Log in to npm correctly
1 parent 5b489db commit 2bdb7e6

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/release.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@ jobs:
5050
run: make build
5151
if: env.TAG
5252

53+
- name: Log in to NPM
54+
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
55+
env:
56+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
57+
if: env.TAG
58+
59+
- name: Publish to NPM
60+
working-directory: pkg
61+
run: npm publish
62+
if: env.TAG
63+
5364
- name: GitHub Release
5465
uses: softprops/action-gh-release@v1
5566
with:
@@ -58,10 +69,3 @@ jobs:
5869
fail_on_unmatched_files: true
5970
generate_release_notes: true
6071
if: env.TAG
61-
62-
- name: Publish to NPM
63-
working-directory: pkg
64-
run: npm publish
65-
env:
66-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
67-
if: env.TAG

0 commit comments

Comments
 (0)