diff --git a/scripts/publish.sh b/scripts/publish.sh index 31aa957..ddd0cbe 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -34,4 +34,8 @@ if [[ -n "$1" ]]; then fi fi -yarn npm publish --tag "$PUBLISH_NPM_TAG" +if [[ "$(yarn --version)" =~ "^1" ]]; then + npm_config__auth=$YARN_NPM_AUTH_TOKEN yarn publish --tag "$PUBLISH_NPM_TAG" +else + yarn npm publish --tag "$PUBLISH_NPM_TAG" +fi