Merge branch 'lerna_ci_take_three' into 'development'

Use NPM registry

See merge request GeneralProtocols/xo/stack!30
This commit is contained in:
Jim Hamill
2025-02-16 05:06:53 +00:00
2 changed files with 8 additions and 10 deletions
+7 -9
View File
@@ -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
View File
@@ -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
} }
} }