mirror of
https://github.com/Borales/actions-yarn.git
synced 2026-06-26 02:19:26 +08:00
Initial commit
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -n "$NPM_AUTH_TOKEN" ]; then
|
||||
# Respect NPM_CONFIG_USERCONFIG if it is provided, default to $HOME/.npmrc
|
||||
NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG-"$HOME/.npmrc"}"
|
||||
NPM_REGISTRY_URL="${NPM_REGISTRY_URL-registry.npmjs.org}"
|
||||
|
||||
# Allow registry.npmjs.org to be overridden with an environment variable
|
||||
printf "//$NPM_REGISTRY_URL/:_authToken=$NPM_AUTH_TOKEN\nregistry=$NPM_REGISTRY_URL" > "$NPM_CONFIG_USERCONFIG"
|
||||
chmod 0600 "$NPM_CONFIG_USERCONFIG"
|
||||
fi
|
||||
|
||||
sh -c "yarn $*"
|
||||
Reference in New Issue
Block a user