diff --git a/gitlab-ci-1.2.yml b/gitlab-ci-1.2.yml index 2c9b9ec0a596368c1b948287dc6131f2408f27b9..4ec16fa33f3d6f406d2eb7fd55701a5ab1112723 100644 --- a/gitlab-ci-1.2.yml +++ b/gitlab-ci-1.2.yml @@ -1,5 +1,5 @@ variables: - WPDESK_CI_VERSION: "2024.12.10" + WPDESK_CI_VERSION: "2025.04.03" MYSQL_ROOT_PASSWORD: "mysql" MYSQL_DATABASE: "wptest" MYSQL_USER: "mysql" @@ -30,18 +30,19 @@ include: - project: 'wpdesk/gitlab-ci' ref: 'master' file: - - '/includes/prepare.yml' - - '/includes/translations.yml' - - '/includes/tests/static-analysis.yml' - - '/includes/tests/lint.yml' - - '/includes/tests/unit.yml' - - '/includes/tests/version-cohesion.yml' - - '/includes/tests/codeception-integration.yml' - - '/includes/tests/codeception.yml' - - '/includes/tests/codeception-parallel.yml' - - '/includes/tests/integration.yml' - '/includes/deploy.yml' - '/includes/deploy/demo.yml' - '/includes/mixins/.after-codeception.yml' - '/includes/mixins/.composer-auth.yml' - '/includes/mixins/.skip-mr.yml' + - '/includes/nodejs/registry.yml' + - '/includes/prepare.yml' + - '/includes/tests/codeception-integration.yml' + - '/includes/tests/codeception-parallel.yml' + - '/includes/tests/codeception.yml' + - '/includes/tests/integration.yml' + - '/includes/tests/lint.yml' + - '/includes/tests/static-analysis.yml' + - '/includes/tests/unit.yml' + - '/includes/tests/version-cohesion.yml' + - '/includes/translations.yml' diff --git a/includes/nodejs/registry.yml b/includes/nodejs/registry.yml new file mode 100644 index 0000000000000000000000000000000000000000..a59c42786abf81394184fb86dcbfd20aec555135 --- /dev/null +++ b/includes/nodejs/registry.yml @@ -0,0 +1,16 @@ +variables: + NPM_REGISTRY_SCOPE: + value: wpdesk + options: + - wpdesk + - octolize + description: The scope of the npm registry + +npm:publish: + rules: + - if: $IS_NPM_LIBRARY && $CI_COMMIT_TAG + stage: deploy + script: + - echo "@${NPM_REGISTRY_SCOPE}:registry=https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/" > .npmrc + - echo "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc + - npm publish diff --git a/includes/prepare.yml b/includes/prepare.yml index 212174fc9fe3c41cf57f5bfb53d94689e6538d22..473fc253492d709ff7d03b68f3dfc51fa0f2cba5 100644 --- a/includes/prepare.yml +++ b/includes/prepare.yml @@ -53,8 +53,9 @@ prepare npm assets: before_script: - mkdir -p /cache/npm-cache - npm config set cache /cache/npm-cache --global - - npm config set -- //${CI_SERVER_HOST}/:_authToken=${PREDATORS_DEPLOY_TOKEN} + - npm config set -- //${CI_SERVER_HOST}/:_authToken=${CI_DEPLOY_TOKEN} - npm config set @octolize:registry=https://${CI_SERVER_HOST}/api/v4/packages/npm/ + - npm config set @wpdesk:registry=https://${CI_SERVER_HOST}/api/v4/packages/npm/ - npm config list script: - if [[ -f package.json ]]; then npm install --no-audit --progress=false; fi