diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e5ddf7b..e46e575 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,7 @@ publish:development: variables: NPM_TAG: 'development' GITLAB_USER_EMAIL: 'ci@stack.xo.cash' - GITLAB_USER_NAME: 'CI - Stack' + GITLAB_USER_NAME: 'GitLab CI' script: # Setup git config - git config --global user.email "${GITLAB_USER_EMAIL}" @@ -42,15 +42,13 @@ publish:development: # Configure git to push with CI token - git remote set-url origin "https://oauth2:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git" - # Setup npm authentication - - | - echo "@${CI_PROJECT_ROOT_NAMESPACE}:registry=https://gitlab.com/api/v4/packages/npm/" > .npmrc - 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 + # Setup npm config for npmjs.com + - npm config set registry https://registry.npmjs.org/ + - npm config set //registry.npmjs.org/:_authToken ${NPM_AUTH_TOKEN} - # Skip git checks when versioning and publishing - - npx lerna version patch --yes --force-publish --no-git-reset - - npx lerna publish from-git --yes --no-git-reset + # Version and publish + - npx lerna version patch --yes --force-publish + - npx lerna publish from-git --yes --registry https://registry.npmjs.org/ only: - development diff --git a/lerna.json b/lerna.json index d384d15..c26710c 100644 --- a/lerna.json +++ b/lerna.json @@ -14,7 +14,7 @@ "message": "chore: increment patch version to %v" }, "publish": { - "registry": "https://gitlab.com/api/v4/packages/npm/", + "registry": "https://registry.npmjs.org/", "exact": true } }