@nestjs-mcp/server 0.1.0-alpha.4 → 0.1.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,10 @@
1
1
  name: 'CodeQL Security Analysis'
2
2
 
3
3
  on:
4
+ push:
5
+ branches: [hotfix/*]
4
6
  pull_request:
5
- branches: [main, develop]
7
+ branches: [main, develop, release/*]
6
8
  schedule:
7
9
  - cron: '0 0 * * 1'
8
10
 
@@ -4,7 +4,6 @@ on:
4
4
  push:
5
5
  tags:
6
6
  - 'v*'
7
- - '*.*.*' # Also trigger on tags without 'v' prefix
8
7
 
9
8
  jobs:
10
9
  build-and-publish:
@@ -32,27 +31,10 @@ jobs:
32
31
  - name: Build package
33
32
  run: pnpm run build
34
33
 
35
- - name: Ensure tag matches package.json version
36
- run: |
37
- TAG_VERSION=${GITHUB_REF#refs/tags/v}
38
- PKG_VERSION=$(node -p "require('./package.json').version")
39
- if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
40
- echo "Tag version ($TAG_VERSION) does not match package.json version ($PKG_VERSION)."
41
- exit 1
42
- fi
43
-
44
- - name: Ensure tag is on main (for latest only)
45
- if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
46
- run: |
47
- TAG_COMMIT=$(git rev-list -n 1 ${{ github.ref }})
48
- MAIN_COMMIT=$(git rev-parse origin/main)
49
- if [ "$TAG_COMMIT" != "$MAIN_COMMIT" ]; then
50
- echo "Tag is not on main. Aborting publish as latest."
51
- exit 1
52
- fi
53
-
54
34
  - name: Publish to NPM (with validations)
55
- run: pnpm run publish -- --no-dry-run
35
+ run: |
36
+ TAG_NAME=${GITHUB_REF#refs/tags/}
37
+ pnpm exec node scripts/npm-publish.js --tag=$TAG_NAME --no-dry-run
56
38
  env:
57
39
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
58
40
  CI: true
@@ -0,0 +1,8 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ branch=$(git rev-parse --abbrev-ref HEAD)
5
+ if echo "$branch" | grep -Eq '^(main|develop|release/.*)$'; then
6
+ echo "❌ Direct commits to $branch are not allowed. Please use a feature or hotfix branch."
7
+ exit 1
8
+ fi