Merge branch 'lerna_ci_take_three' into 'development'
Use NPM registry See merge request GeneralProtocols/xo/stack!30
This commit is contained in:
+7
-9
@@ -33,7 +33,7 @@ publish:development:
|
|||||||
variables:
|
variables:
|
||||||
NPM_TAG: 'development'
|
NPM_TAG: 'development'
|
||||||
GITLAB_USER_EMAIL: 'ci@stack.xo.cash'
|
GITLAB_USER_EMAIL: 'ci@stack.xo.cash'
|
||||||
GITLAB_USER_NAME: 'CI - Stack'
|
GITLAB_USER_NAME: 'GitLab CI'
|
||||||
script:
|
script:
|
||||||
# Setup git config
|
# Setup git config
|
||||||
- git config --global user.email "${GITLAB_USER_EMAIL}"
|
- git config --global user.email "${GITLAB_USER_EMAIL}"
|
||||||
@@ -42,15 +42,13 @@ publish:development:
|
|||||||
# Configure git to push with CI token
|
# Configure git to push with CI token
|
||||||
- git remote set-url origin "https://oauth2:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git"
|
- git remote set-url origin "https://oauth2:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git"
|
||||||
|
|
||||||
# Setup npm authentication
|
# Setup npm config for npmjs.com
|
||||||
- |
|
- npm config set registry https://registry.npmjs.org/
|
||||||
echo "@${CI_PROJECT_ROOT_NAMESPACE}:registry=https://gitlab.com/api/v4/packages/npm/" > .npmrc
|
- npm config set //registry.npmjs.org/:_authToken ${NPM_AUTH_TOKEN}
|
||||||
echo "//gitlab.com/api/v4/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc
|
|
||||||
echo "//gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc
|
|
||||||
|
|
||||||
# Skip git checks when versioning and publishing
|
# Version and publish
|
||||||
- npx lerna version patch --yes --force-publish --no-git-reset
|
- npx lerna version patch --yes --force-publish
|
||||||
- npx lerna publish from-git --yes --no-git-reset
|
- npx lerna publish from-git --yes --registry https://registry.npmjs.org/
|
||||||
only:
|
only:
|
||||||
- development
|
- development
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
"message": "chore: increment patch version to %v"
|
"message": "chore: increment patch version to %v"
|
||||||
},
|
},
|
||||||
"publish": {
|
"publish": {
|
||||||
"registry": "https://gitlab.com/api/v4/packages/npm/",
|
"registry": "https://registry.npmjs.org/",
|
||||||
"exact": true
|
"exact": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user