Skip to content

Commit 75eca32

Browse files
committed
bump: version 0.1.20
1 parent 3fe6eee commit 75eca32

File tree

13 files changed

+165
-58
lines changed

13 files changed

+165
-58
lines changed

.github/workflows/publish-npm.yml

Lines changed: 141 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Install dependencies
3535
run: yarn install --immutable
3636

37-
- name: Extract version info
37+
- name: Extract version from tag
3838
id: extract_version
3939
run: |
4040
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
@@ -47,7 +47,9 @@ jobs:
4747
# Tag trigger - extract from tag name
4848
VERSION=${GITHUB_REF_NAME#v}
4949
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
50+
echo "📌 Expected version: $VERSION"
5051
52+
# Determine npm tag based on version format
5153
if [[ "$VERSION" =~ -[0-9]+$ ]]; then
5254
NPM_TAG="alpha"
5355
echo "🚨 Decorated version detected, using --tag alpha"
@@ -58,53 +60,158 @@ jobs:
5860
echo "NPM_TAG=$NPM_TAG" >> $GITHUB_OUTPUT
5961
fi
6062
61-
- name: Build common package (test)
63+
- name: Verify package versions match tag
64+
if: github.event_name == 'push'
6265
run: |
63-
echo "Building @vue-skuilder/common..."
64-
yarn workspace @vue-skuilder/common build
66+
VERSION=${{ steps.extract_version.outputs.VERSION }}
67+
68+
# Verify all packages have the correct version
69+
for package in common db common-ui courseware edit-ui client platform-ui standalone-ui express mcp cli; do
70+
PACKAGE_VERSION=$(cd packages/$package && node -p "require('./package.json').version")
71+
if [ "$PACKAGE_VERSION" != "$VERSION" ]; then
72+
echo "❌ Version mismatch in packages/$package: expected $VERSION, found $PACKAGE_VERSION"
73+
exit 1
74+
fi
75+
echo "✅ packages/$package version $PACKAGE_VERSION matches tag"
76+
done
6577
66-
- name: Verify build output
67-
run: |
68-
if [ ! -d "packages/common/dist" ]; then
69-
echo "❌ Error: dist directory not found for @vue-skuilder/common"
70-
exit 1
71-
fi
72-
echo "✅ @vue-skuilder/common build output verified"
78+
echo "✅ All package versions verified"
7379
74-
- name: Debug environment
80+
- name: Lint packages
7581
run: |
76-
echo "NODE_AUTH_TOKEN is set: ${{ secrets.NPM_TOKEN != '' }}"
77-
echo "Working directory: $(pwd)"
78-
echo "Yarn version: $(yarn --version)"
79-
cd packages/common
80-
echo "Package version: $(node -p "require('./package.json').version")"
81-
echo "Package name: $(node -p "require('./package.json').name")"
82-
83-
- name: Test publish (dry run)
84-
if: github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'true'
82+
yarn workspace @vue-skuilder/common lint:check
83+
yarn workspace @vue-skuilder/db lint:check
84+
yarn workspace @vue-skuilder/express lint:check
85+
yarn workspace @vue-skuilder/cli lint:check
86+
87+
- name: Build packages in dependency order
8588
run: |
86-
NPM_TAG="${{ steps.extract_version.outputs.NPM_TAG }}"
89+
echo "Building common package..."
90+
yarn workspace @vue-skuilder/common build
8791
88-
echo "Testing publish of @vue-skuilder/common with --dry-run..."
89-
cd packages/common
90-
yarn npm publish --access public --tag $NPM_TAG --dry-run
92+
echo "Building db package..."
93+
yarn workspace @vue-skuilder/db build
9194
92-
echo "✅ Dry run successful!"
93-
echo "To publish for real, re-run workflow with dry_run=false"
94-
env:
95-
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
96-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
95+
echo "Building common-ui package..."
96+
yarn workspace @vue-skuilder/common-ui build
97+
98+
echo "Building courseware package..."
99+
yarn workspace @vue-skuilder/courseware build
100+
101+
echo "Building edit-ui package..."
102+
yarn workspace @vue-skuilder/edit-ui build
103+
104+
echo "Building client package..."
105+
yarn workspace @vue-skuilder/client build
106+
107+
echo "Building platform-ui package..."
108+
yarn workspace @vue-skuilder/platform-ui build
109+
110+
echo "Building standalone-ui package..."
111+
yarn workspace @vue-skuilder/standalone-ui build
112+
113+
echo "Building express package..."
114+
yarn workspace @vue-skuilder/express build
115+
116+
# echo "Building tuilder package..."
117+
# yarn workspace @vue-skuilder/tuilder build
118+
119+
echo "Building mcp package..."
120+
yarn workspace @vue-skuilder/mcp build
121+
122+
echo "Building cli package..."
123+
yarn workspace @vue-skuilder/cli build
124+
125+
- name: Verify build outputs
126+
run: |
127+
for package in common db common-ui courseware edit-ui client platform-ui standalone-ui express mcp cli; do
128+
if [ ! -d "packages/$package/dist" ]; then
129+
echo "Error: dist directory not found for @vue-skuilder/$package"
130+
exit 1
131+
fi
132+
echo "✓ @vue-skuilder/$package build output verified"
133+
done
97134
98-
- name: Publish common package (REAL)
135+
- name: Publish packages in dependency order
99136
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'false')
100137
run: |
138+
set -e
101139
NPM_TAG="${{ steps.extract_version.outputs.NPM_TAG }}"
102140
103141
echo "Publishing @vue-skuilder/common..."
104-
cd packages/common
105-
yarn npm publish --access public --tag $NPM_TAG
142+
cd packages/common && yarn npm publish --access public --tag $NPM_TAG && cd ../..
143+
144+
echo "Publishing @vue-skuilder/db..."
145+
cd packages/db && yarn npm publish --access public --tag $NPM_TAG && cd ../..
146+
147+
echo "Publishing @vue-skuilder/common-ui..."
148+
cd packages/common-ui && yarn npm publish --access public --tag $NPM_TAG && cd ../..
149+
150+
echo "Publishing @vue-skuilder/edit-ui..."
151+
cd packages/edit-ui && yarn npm publish --access public --tag $NPM_TAG && cd ../..
152+
153+
echo "Publishing @vue-skuilder/courseware..."
154+
cd packages/courseware && yarn npm publish --access public --tag $NPM_TAG && cd ../..
155+
156+
echo "Publishing @vue-skuilder/client..."
157+
cd packages/client && yarn npm publish --access public --tag $NPM_TAG && cd ../..
158+
159+
echo "Publishing @vue-skuilder/platform-ui..."
160+
cd packages/platform-ui && yarn npm publish --access public --tag $NPM_TAG && cd ../..
161+
162+
echo "Publishing @vue-skuilder/standalone-ui..."
163+
cd packages/standalone-ui && yarn npm publish --access public --tag $NPM_TAG && cd ../..
106164
107-
echo "✅ Published @vue-skuilder/common"
165+
echo "Publishing @vue-skuilder/mcp..."
166+
cd packages/mcp && yarn npm publish --access public --tag $NPM_TAG && cd ../..
167+
168+
# echo "Publishing @vue-skuilder/tuilder..."
169+
# cd packages/tuilder && yarn npm publish --access public --tag $NPM_TAG && cd ../..
170+
171+
echo "Publishing @vue-skuilder/express..."
172+
cd packages/express && yarn npm publish --access public --tag $NPM_TAG && cd ../..
173+
174+
echo "Publishing @vue-skuilder/cli (scoped)..."
175+
cd packages/cli && yarn npm publish --access public --tag $NPM_TAG && cd ../..
176+
177+
# Dual-publish CLI as unscoped 'skuilder' package
178+
echo "Publishing CLI as 'skuilder'..."
179+
cd packages/cli
180+
181+
# Modify package.json for unscoped publish
182+
node -e "
183+
const fs = require('fs');
184+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
185+
pkg.name = 'skuilder';
186+
pkg.description = 'CLI tool for scaffolding Skuilder course applications';
187+
delete pkg.publishConfig;
188+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
189+
"
190+
191+
# Use yarn npm publish to maintain workspace dependency resolution
192+
yarn npm publish --access public --tag $NPM_TAG
193+
cd ../..
194+
echo "All packages published successfully!"
108195
env:
109196
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
110197
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
198+
199+
- name: NPM publish completed
200+
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'false')
201+
run: |
202+
echo "✅ All vue-skuilder packages published to NPM registry"
203+
echo "📦 Packages published:"
204+
echo " - @vue-skuilder/common"
205+
echo " - @vue-skuilder/db"
206+
echo " - @vue-skuilder/common-ui"
207+
echo " - @vue-skuilder/courseware"
208+
echo " - @vue-skuilder/edit-ui"
209+
echo " - @vue-skuilder/client"
210+
echo " - @vue-skuilder/platform-ui"
211+
echo " - @vue-skuilder/standalone-ui"
212+
echo " - @vue-skuilder/express"
213+
echo " - @vue-skuilder/mcp"
214+
echo " - @vue-skuilder/cli"
215+
echo " - skuilder (CLI unscoped)"
216+
echo ""
217+
echo "🚀 GitHub release will be created by the 'Publish GitHub Release' workflow"

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.19",
6+
"version": "0.1.20",
77
"type": "module",
88
"description": "CLI scaffolding tool for vue-skuilder projects",
99
"bin": {
@@ -81,5 +81,5 @@
8181
"node": ">=18.0.0"
8282
},
8383
"packageManager": "yarn@4.12.0",
84-
"stableVersion": "0.1.19"
84+
"stableVersion": "0.1.20"
8585
}

packages/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.19",
6+
"version": "0.1.20",
77
"license": "MIT",
88
"main": "dist/index.js",
99
"module": "dist/index.esm.js",
@@ -47,5 +47,5 @@
4747
"typescript": "~5.9.3",
4848
"vitest": "^4.0.15"
4949
},
50-
"stableVersion": "0.1.19"
50+
"stableVersion": "0.1.20"
5151
}

packages/common-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.19",
6+
"version": "0.1.20",
77
"main": "./dist/common-ui.umd.js",
88
"module": "./dist/common-ui.es.js",
99
"types": "./dist/index.d.ts",
@@ -70,5 +70,5 @@
7070
"vite-plugin-dts": "^4.5.3",
7171
"vitest": "^4.0.15"
7272
},
73-
"stableVersion": "0.1.19"
73+
"stableVersion": "0.1.20"
7474
}

packages/common/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.19",
6+
"version": "0.1.20",
77
"type": "module",
88
"main": "dist/index.js",
99
"module": "dist/index.mjs",
@@ -36,5 +36,5 @@
3636
"zod": "^3.23.8",
3737
"zod-to-json-schema": "^3.23.5"
3838
},
39-
"stableVersion": "0.1.19"
39+
"stableVersion": "0.1.20"
4040
}

packages/courseware/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.19",
6+
"version": "0.1.20",
77
"type": "module",
88
"main": "./dist/index.cjs.js",
99
"module": "./dist/index.mjs",
@@ -69,5 +69,5 @@
6969
"peerDependencies": {
7070
"vue": "^3.2.0"
7171
},
72-
"stableVersion": "0.1.19"
72+
"stableVersion": "0.1.20"
7373
}

packages/db/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"publishConfig": {
55
"access": "public"
66
},
7-
"version": "0.1.19",
7+
"version": "0.1.20",
88
"description": "Database layer for vue-skuilder",
99
"main": "dist/index.js",
1010
"module": "dist/index.mjs",
@@ -62,5 +62,5 @@
6262
"vite": "^7.0.0",
6363
"vitest": "^4.0.15"
6464
},
65-
"stableVersion": "0.1.19"
65+
"stableVersion": "0.1.20"
6666
}

packages/edit-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.19",
6+
"version": "0.1.20",
77
"main": "./dist/edit-ui.umd.js",
88
"module": "./dist/edit-ui.es.js",
99
"types": "./dist/index.d.ts",
@@ -65,5 +65,5 @@
6565
"vite": "^7.0.0",
6666
"vitest": "^4.0.15"
6767
},
68-
"stableVersion": "0.1.19"
68+
"stableVersion": "0.1.20"
6969
}

packages/express/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.19",
6+
"version": "0.1.20",
77
"description": "an API",
88
"main": "dist/index.js",
99
"type": "module",
@@ -77,5 +77,5 @@
7777
"typescript-eslint": "^8.48.1",
7878
"vitest": "^4.0.15"
7979
},
80-
"stableVersion": "0.1.19"
80+
"stableVersion": "0.1.20"
8181
}

packages/mcp/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@vue-skuilder/mcp",
3-
"version": "0.1.19",
3+
"version": "0.1.20",
44
"type": "module",
55
"exports": {
66
".": {
@@ -35,5 +35,5 @@
3535
"tsup": "^8.0.0",
3636
"typescript": "~5.9.3"
3737
},
38-
"stableVersion": "0.1.19"
38+
"stableVersion": "0.1.20"
3939
}

0 commit comments

Comments
 (0)