提交 118533c1 编写于 作者: CoCo_Code_Op2's avatar CoCo_Code_Op2 ⛹🏽

更新.codechina-ci.yml

上级 f719d206
......@@ -22,16 +22,16 @@ publish:
stage: deploy
script:
# If no .npmrc if included in the repo, generate a temporary one
- echo $NPM_PUBLISH_TOKEN
- echo "https//registry.npmjs.org/:_authToken=\${NPM_PUBLISH_TOKEN}"
- |
if [[ ! -f .npmrc ]]; then
echo 'No .npmrc found! Creating one now. Now we will generate one'
{
echo "//registry.npmjs.org/:_authToken=\${NPM_PUBLISH_TOKEN}"
echo "https//registry.npmjs.org/:_authToken=\${NPM_PUBLISH_TOKEN}"
} >> .npmrc
fi
- npm config get registry
- echo "Created the following .npmrc:"
- cat .npmrc
- echo "Created the following .npmrc:"; cat .npmrc
# Extract a few values from package.json
- NPM_PACKAGE_NAME=$(node -p "require('./package.json').name")
......@@ -39,6 +39,7 @@ publish:
# Compare the version in package.json to all published versions.
# If the package.json version has not yet been published, run `npm publish`.
- npm config get registry
- |
if [[ $(npm view "${NPM_PACKAGE_NAME}" versions) != *"'${NPM_PACKAGE_VERSION}'"* ]]; then
npm publish
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册