Skip to content
Snippets Groups Projects
Commit 15a63de3 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

Merge branch 'feat/npm-publish' into 'master'

feat: add npm registry configuration

See merge request wpdesk/gitlab-ci!271
parents 9b9a4ad2 d89dae89
No related branches found
No related tags found
No related merge requests found
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'
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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment