Skip to content

Commit 41ba5a2

Browse files
committed
flatten npm publish action
1 parent 9e890b3 commit 41ba5a2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/publish.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,16 @@ jobs:
2626
- name: Navigate to npm directory
2727
run: cd ./npm
2828

29-
- name: Setup .npmrc file to publish to npm
30-
run: |
31-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
32-
env:
33-
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}
3429

35-
- name: Verify .npmrc and Publish
30+
- name: Publish
3631
run: |
32+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
3733
if grep -qE "_authToken=.{1,}" .npmrc; then
3834
npm publish
3935
else
4036
echo "Failed to create .npmrc file" && exit 1
4137
fi
4238
working-directory: ./npm
39+
env:
40+
NPM_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}
4341

0 commit comments

Comments
 (0)