Attempted fix for publishing
This commit is contained in:
+17
-21
@@ -1,6 +1,7 @@
|
||||
image: node:22
|
||||
|
||||
stages:
|
||||
- test
|
||||
- publish
|
||||
|
||||
cache:
|
||||
@@ -15,31 +16,26 @@ cache:
|
||||
- node_modules/
|
||||
|
||||
before_script:
|
||||
- npm install
|
||||
- npm run build
|
||||
|
||||
.publish_to_npm:
|
||||
# Configure which stage in the pipeline this part should be run in.
|
||||
stage: publish
|
||||
- npm install
|
||||
- npm run build
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- npm config set //registry.npmjs.org/:_authToken ${NPM_AUTH_TOKEN}
|
||||
- npx lerna publish from-package --no-private --yes --registry https://registry.npmjs.org/ --tag ${NPM_TAG}
|
||||
- npm run test
|
||||
|
||||
publish:development:
|
||||
# Configure what tag to use for this publication.
|
||||
variables:
|
||||
NPM_TAG: 'development'
|
||||
|
||||
script:
|
||||
# add the NPM_TAG to the version field in the package file during this script
|
||||
- sed -i -r "/version/s/([0-9\.]+)/\1-${NPM_TAG}.${CI_JOB_ID}/g" packages/primitives/package.json
|
||||
|
||||
only:
|
||||
- development
|
||||
|
||||
# Use the common template to publish the library.
|
||||
extends: .publish_to_npm
|
||||
# Configure what tag to use for this publication.
|
||||
variables:
|
||||
NPM_TAG: 'development'
|
||||
script:
|
||||
# add the NPM_TAG to the version field in the package file during this script
|
||||
- sed -i -r "/version/s/([0-9\.]+)/\1-${NPM_TAG}.${CI_JOB_ID}/g" packages/primitives/package.json
|
||||
# set our npm token and then use lerna to publish all packages that are not marked as "private".
|
||||
- npm config set //registry.npmjs.org/:_authToken ${NPM_AUTH_TOKEN}
|
||||
- npx lerna publish from-package --no-private --yes --registry https://registry.npmjs.org/ --tag ${NPM_TAG}
|
||||
only:
|
||||
- development
|
||||
|
||||
# Publish the documentation to GitLab Pages (for now).
|
||||
pages:
|
||||
|
||||
Reference in New Issue
Block a user