cli-mcp-mapper 1.0.0 → 1.0.2

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.
@@ -0,0 +1,55 @@
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ workflow_dispatch: # Manual trigger only
5
+
6
+ permissions:
7
+ contents: write # Needed to create tags
8
+ id-token: write # Needed for NPM trusted publishing
9
+
10
+ jobs:
11
+ publish:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0 # Fetch all history and tags
18
+
19
+ - name: Setup Node.js
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version: '24'
23
+ registry-url: 'https://registry.npmjs.org'
24
+
25
+ - name: Get version from package.json
26
+ id: package-version
27
+ run: |
28
+ VERSION=$(node -p "require('./package.json').version")
29
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
30
+ echo "📦 Package version: $VERSION"
31
+
32
+ - name: Check if tag already exists
33
+ id: check-tag
34
+ run: |
35
+ VERSION=${{ steps.package-version.outputs.version }}
36
+ if git rev-parse "v$VERSION" >/dev/null 2>&1; then
37
+ echo "❌ ERROR: Tag v$VERSION already exists!"
38
+ echo "Please update the version in package.json before publishing."
39
+ exit 1
40
+ else
41
+ echo "✅ Tag v$VERSION does not exist, proceeding..."
42
+ fi
43
+
44
+ - name: Create and push tag
45
+ run: |
46
+ VERSION=${{ steps.package-version.outputs.version }}
47
+ git config user.name "github-actions[bot]"
48
+ git config user.email "github-actions[bot]@users.noreply.github.com"
49
+ git tag -a "v$VERSION" -m "Release v$VERSION"
50
+ git push origin "v$VERSION"
51
+ echo "✅ Created and pushed tag v$VERSION"
52
+
53
+ - run: npm ci
54
+ - run: npm run build --if-present
55
+ - run: npm publish