Skip to content

Commit 7860a4b

Browse files
committed
chore: update github action
1 parent 012bc6b commit 7860a4b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
env:
88
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
9+
NPM_AUTH_TOKEN_ORG: ${{ secrets.NPM_AUTH_TOKEN_ORG }}
910

1011
jobs:
1112
publish:

bin/try-publish.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ fi
1818

1919
if [ "$published" != "$version" ]; then
2020
echo "Try to publish $version version of the $name package."
21-
echo "//registry.npmjs.org/:_authToken=\${NPM_AUTH_TOKEN}" > .npmrc
21+
22+
if [ "$name" != "8base-react-sdk" ]; then
23+
echo "//registry.npmjs.org/:_authToken=\${NPM_AUTH_TOKEN_ORG}" > .npmrc
24+
else
25+
echo "//registry.npmjs.org/:_authToken=\${NPM_AUTH_TOKEN}" > .npmrc
26+
fi
27+
2228
npm publish --access public; if [ "$?" != "0" ]; then status=1; fi
2329
else
2430
echo "Current version of the package already published to the NPM."

0 commit comments

Comments
 (0)