Improve CI

This commit is contained in:
Jim Hamill
2025-02-16 07:32:23 +00:00
parent 03c2af60e2
commit 35e5c55cad
2 changed files with 10 additions and 6 deletions
+9 -4
View File
@@ -51,10 +51,15 @@ publish:development:
# Version and publish # Version and publish
- npx lerna publish --yes --canary --preid ${NPM_TAG} --dist-tag ${NPM_TAG} - npx lerna publish --yes --canary --preid ${NPM_TAG} --dist-tag ${NPM_TAG}
rules: only:
# Only run on development branch and when actioning merge requests. - development
# NOTE: If we don't run on only merge requests, we end up with an infinite looping due to Lerna updating the branch with its version commits.
- if: $CI_COMMIT_BRANCH == "development" && $CI_PIPELINE_SOURCE == 'merge_request_event' # TODO: Document the Lerna Recursive problem when we run lerna version on our main branch.
# NOTE: The "lerna version" command will create a new commit and push it to our main branch.
# This can create a problem where our CI on the "main" branch is recursively triggered.
# To prevent this, we add [ci skip] to our Lerna Version commit message.
# This is supported OOTB by GitLab (and GitHub).
# See: https://docs.gitlab.com/ee/ci/pipelines/#skip-a-pipeline
# Publish the documentation to GitLab Pages (for now). # Publish the documentation to GitLab Pages (for now).
pages: pages:
+1 -2
View File
@@ -4,14 +4,13 @@
"packages": [ "packages": [
"packages/*" "packages/*"
], ],
"npmClient": "npm",
"command": { "command": {
"version": { "version": {
"allowBranch": [ "allowBranch": [
"development" "development"
], ],
"exact": true, "exact": true,
"message": "chore: increment patch version to %v" "message": "chore: Version %v [skip ci]"
}, },
"publish": { "publish": {
"registry": "https://registry.npmjs.org/", "registry": "https://registry.npmjs.org/",