Attempted fix for publishing

This commit is contained in:
Jim Hamill
2025-01-12 03:02:58 +00:00
parent 31ecf52540
commit fa46c5a4f8
11 changed files with 88 additions and 74 deletions
+17 -21
View File
@@ -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: