File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed
Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+
8+ permissions :
9+ contents : read
10+ id-token : write
11+
12+ jobs :
13+ publish :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v5
18+
19+ - uses : pnpm/action-setup@v4
20+ with :
21+ version : 10.17.0
22+
23+ - uses : actions/setup-node@v4
24+ with :
25+ node-version : 24
26+ cache : pnpm
27+ registry-url : " https://registry.npmjs.org"
28+
29+ - name : Verify package version matches tag
30+ run : |
31+ PACKAGE_VERSION=$(node -p "require('./packages/skill-doctor/package.json').version")
32+ TAG_VERSION="${GITHUB_REF_NAME#v}"
33+
34+ if [ "$PACKAGE_VERSION" != "$TAG_VERSION" ]; then
35+ echo "Tag version ($TAG_VERSION) does not match package version ($PACKAGE_VERSION)."
36+ exit 1
37+ fi
38+
39+ - run : pnpm install --frozen-lockfile
40+ - run : pnpm lint
41+ - run : pnpm typecheck
42+ - run : pnpm test
43+ - run : pnpm release:check
44+
45+ - name : Publish to npm
46+ working-directory : packages/skill-doctor
47+ run : npm publish
Original file line number Diff line number Diff line change 1515 "lint:fix" : " oxlint --fix packages/skill-doctor/src packages/skill-doctor/tests" ,
1616 "format" : " oxfmt --write ." ,
1717 "format:check" : " oxfmt --check ." ,
18+ "release:check" : " pnpm --filter skill-doctor build && cd packages/skill-doctor && npm pack --dry-run" ,
1819 "test" : " pnpm -r test" ,
1920 "typecheck" : " pnpm -r typecheck"
2021 },
Original file line number Diff line number Diff line change 3535 "default" : " ./dist/index.js"
3636 }
3737 },
38+ "publishConfig" : {
39+ "access" : " public"
40+ },
3841 "scripts" : {
3942 "dev" : " tsdown --watch" ,
4043 "build" : " rm -rf dist && NODE_ENV=production tsdown" ,
44+ "pack:check" : " npm pack --dry-run" ,
4145 "typecheck" : " tsc --noEmit" ,
4246 "test" : " pnpm build && vitest run"
4347 },
You can’t perform that action at this time.
0 commit comments