|
|
@@ -127,17 +127,22 @@ jobs:
|
|
|
# Publish to npm with appropriate dist-tag
|
|
|
# Note: we do not use `lerna publish` because at the time of writing, it fails to publish
|
|
|
# using the Trusted Publishing workflow for some reason.
|
|
|
+ # We use a custom script to handle publishConfig.directory for packages like @vendure/admin-ui
|
|
|
+ # that need to publish from a nested directory.
|
|
|
- name: Publish to NPM (release)
|
|
|
if: matrix.type == 'release'
|
|
|
- run: npx lerna exec --no-private -- npm publish --access public
|
|
|
+ run: |
|
|
|
+ npx lerna exec --no-private -- 'publish_dir=$(node -p "require(\"./package.json\").publishConfig?.directory || \".\"") && cd "$publish_dir" && npm publish --access public'
|
|
|
|
|
|
- name: Publish to NPM (master-nightly)
|
|
|
if: matrix.type == 'master-nightly' && steps.commit_check.outputs.should_publish == 'true'
|
|
|
- run: npx lerna exec --no-private -- npm publish --access public --tag master
|
|
|
+ run: |
|
|
|
+ npx lerna exec --no-private -- 'publish_dir=$(node -p "require(\"./package.json\").publishConfig?.directory || \".\"") && cd "$publish_dir" && npm publish --access public --tag master'
|
|
|
|
|
|
- name: Publish to NPM (minor-nightly)
|
|
|
if: matrix.type == 'minor-nightly' && steps.commit_check.outputs.should_publish == 'true'
|
|
|
- run: npx lerna exec --no-private -- npm publish --dd --access public --tag minor
|
|
|
+ run: |
|
|
|
+ npx lerna exec --no-private -- 'publish_dir=$(node -p "require(\"./package.json\").publishConfig?.directory || \".\"") && cd "$publish_dir" && npm publish --access public --tag minor'
|
|
|
|
|
|
- name: Skip publish (no new commits)
|
|
|
if: matrix.type != 'release' && steps.commit_check.outputs.should_publish == 'false'
|