fix: publish built-in nodes package (#506)
This commit is contained in:
@@ -11,6 +11,7 @@ on:
|
|||||||
- core
|
- core
|
||||||
- viewer
|
- viewer
|
||||||
- editor
|
- editor
|
||||||
|
- nodes
|
||||||
- mcp
|
- mcp
|
||||||
- ifc-converter
|
- ifc-converter
|
||||||
- all
|
- all
|
||||||
@@ -75,7 +76,7 @@ jobs:
|
|||||||
# peerDeps sync below must use shell vars, not env indirection.
|
# peerDeps sync below must use shell vars, not env indirection.
|
||||||
declare -A NEW_VERSIONS
|
declare -A NEW_VERSIONS
|
||||||
|
|
||||||
for pkg in core viewer editor mcp ifc-converter; do
|
for pkg in core viewer editor nodes mcp ifc-converter; do
|
||||||
if [ "$TARGET" = "$pkg" ] || [ "$TARGET" = "all" ]; then
|
if [ "$TARGET" = "$pkg" ] || [ "$TARGET" = "all" ]; then
|
||||||
CUR=$(jq -r '.version' packages/$pkg/package.json)
|
CUR=$(jq -r '.version' packages/$pkg/package.json)
|
||||||
NEW=$(bump_version "$CUR")
|
NEW=$(bump_version "$CUR")
|
||||||
@@ -90,9 +91,9 @@ jobs:
|
|||||||
|
|
||||||
# Sync inter-package references in peerDependencies and devDependencies.
|
# Sync inter-package references in peerDependencies and devDependencies.
|
||||||
# Anything that references a bumped @pascal-app/* package is updated to ^NEW.
|
# Anything that references a bumped @pascal-app/* package is updated to ^NEW.
|
||||||
for pkg in core viewer editor mcp ifc-converter; do
|
for pkg in core viewer editor nodes mcp ifc-converter; do
|
||||||
FILE=packages/$pkg/package.json
|
FILE=packages/$pkg/package.json
|
||||||
for dep in core viewer editor mcp ifc-converter; do
|
for dep in core viewer editor nodes mcp ifc-converter; do
|
||||||
VAL="${NEW_VERSIONS[$dep]}"
|
VAL="${NEW_VERSIONS[$dep]}"
|
||||||
[ -z "$VAL" ] && continue
|
[ -z "$VAL" ] && continue
|
||||||
jq --arg name "@pascal-app/$dep" --arg v "^$VAL" '
|
jq --arg name "@pascal-app/$dep" --arg v "^$VAL" '
|
||||||
@@ -103,7 +104,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "=== @pascal-app/* refs after sync ==="
|
echo "=== @pascal-app/* refs after sync ==="
|
||||||
for pkg in core viewer editor mcp ifc-converter; do
|
for pkg in core viewer editor nodes mcp ifc-converter; do
|
||||||
echo "--- packages/$pkg/package.json ---"
|
echo "--- packages/$pkg/package.json ---"
|
||||||
jq '{ peerDependencies: (.peerDependencies // {} | with_entries(select(.key | startswith("@pascal-app/")))), devDependencies: (.devDependencies // {} | with_entries(select(.key | startswith("@pascal-app/")))) }' packages/$pkg/package.json
|
jq '{ peerDependencies: (.peerDependencies // {} | with_entries(select(.key | startswith("@pascal-app/")))), devDependencies: (.devDependencies // {} | with_entries(select(.key | startswith("@pascal-app/")))) }' packages/$pkg/package.json
|
||||||
done
|
done
|
||||||
@@ -152,6 +153,21 @@ jobs:
|
|||||||
echo "📦 Published @pascal-app/editor@$EDITOR_VERSION"
|
echo "📦 Published @pascal-app/editor@$EDITOR_VERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Build & publish nodes
|
||||||
|
if: inputs.package == 'nodes' || inputs.package == 'all'
|
||||||
|
working-directory: packages/nodes
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: |
|
||||||
|
bun run build
|
||||||
|
if [ "${{ inputs.dry-run }}" = "true" ]; then
|
||||||
|
echo "🏜️ Dry run — would publish @pascal-app/nodes@$NODES_VERSION"
|
||||||
|
npm publish --dry-run --access public
|
||||||
|
else
|
||||||
|
npm publish --access public
|
||||||
|
echo "📦 Published @pascal-app/nodes@$NODES_VERSION"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build & publish mcp
|
- name: Build & publish mcp
|
||||||
if: inputs.package == 'mcp' || inputs.package == 'all'
|
if: inputs.package == 'mcp' || inputs.package == 'all'
|
||||||
working-directory: packages/mcp
|
working-directory: packages/mcp
|
||||||
@@ -203,6 +219,10 @@ jobs:
|
|||||||
PKGS="$PKGS @pascal-app/editor@$EDITOR_VERSION"
|
PKGS="$PKGS @pascal-app/editor@$EDITOR_VERSION"
|
||||||
TAGS="$TAGS @pascal-app/editor@$EDITOR_VERSION"
|
TAGS="$TAGS @pascal-app/editor@$EDITOR_VERSION"
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$NODES_VERSION" ]; then
|
||||||
|
PKGS="$PKGS @pascal-app/nodes@$NODES_VERSION"
|
||||||
|
TAGS="$TAGS @pascal-app/nodes@$NODES_VERSION"
|
||||||
|
fi
|
||||||
if [ -n "$MCP_VERSION" ]; then
|
if [ -n "$MCP_VERSION" ]; then
|
||||||
PKGS="$PKGS @pascal-app/mcp@$MCP_VERSION"
|
PKGS="$PKGS @pascal-app/mcp@$MCP_VERSION"
|
||||||
TAGS="$TAGS @pascal-app/mcp@$MCP_VERSION"
|
TAGS="$TAGS @pascal-app/mcp@$MCP_VERSION"
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"release:viewer": "gh workflow run release.yml -f package=viewer -f bump=patch",
|
"release:viewer": "gh workflow run release.yml -f package=viewer -f bump=patch",
|
||||||
"release:core": "gh workflow run release.yml -f package=core -f bump=patch",
|
"release:core": "gh workflow run release.yml -f package=core -f bump=patch",
|
||||||
"release:editor": "gh workflow run release.yml -f package=editor -f bump=patch",
|
"release:editor": "gh workflow run release.yml -f package=editor -f bump=patch",
|
||||||
|
"release:nodes": "gh workflow run release.yml -f package=nodes -f bump=patch",
|
||||||
"release:mcp": "gh workflow run release.yml -f package=mcp -f bump=patch",
|
"release:mcp": "gh workflow run release.yml -f package=mcp -f bump=patch",
|
||||||
"release:minor": "gh workflow run release.yml -f package=all -f bump=minor",
|
"release:minor": "gh workflow run release.yml -f package=all -f bump=minor",
|
||||||
"release:major": "gh workflow run release.yml -f package=all -f bump=major"
|
"release:major": "gh workflow run release.yml -f package=all -f bump=major"
|
||||||
|
|||||||
Reference in New Issue
Block a user