Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- core
- viewer
- editor
- nodes
- mcp
- ifc-converter
- all
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
# peerDeps sync below must use shell vars, not env indirection.
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
CUR=$(jq -r '.version' packages/$pkg/package.json)
NEW=$(bump_version "$CUR")
Expand All @@ -90,9 +91,9 @@ jobs:

# Sync inter-package references in peerDependencies and devDependencies.
# 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
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]}"
[ -z "$VAL" ] && continue
jq --arg name "@pascal-app/$dep" --arg v "^$VAL" '
Expand All @@ -103,7 +104,7 @@ jobs:
done

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 ---"
jq '{ peerDependencies: (.peerDependencies // {} | with_entries(select(.key | startswith("@pascal-app/")))), devDependencies: (.devDependencies // {} | with_entries(select(.key | startswith("@pascal-app/")))) }' packages/$pkg/package.json
done
Expand Down Expand Up @@ -152,6 +153,21 @@ jobs:
echo "📦 Published @pascal-app/editor@$EDITOR_VERSION"
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
if: inputs.package == 'mcp' || inputs.package == 'all'
working-directory: packages/mcp
Expand Down Expand Up @@ -203,6 +219,10 @@ jobs:
PKGS="$PKGS @pascal-app/editor@$EDITOR_VERSION"
TAGS="$TAGS @pascal-app/editor@$EDITOR_VERSION"
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
PKGS="$PKGS @pascal-app/mcp@$MCP_VERSION"
TAGS="$TAGS @pascal-app/mcp@$MCP_VERSION"
Expand Down