-
-
Notifications
You must be signed in to change notification settings - Fork 3
125 lines (105 loc) · 4.04 KB
/
publish.yml
File metadata and controls
125 lines (105 loc) · 4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: Publish to NPM
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
scope: "@julianoczkowski"
- name: Update npm to latest (required for OIDC)
run: npm install -g npm@latest
- name: Install dependencies
run: npm ci
- name: Download documentation
run: node download-docs.js
- name: Build package
run: npm run build
- name: Verify documentation
run: |
echo "Checking documentation files..."
DOC_COUNT=$(ls docs/*.md 2>/dev/null | wc -l)
echo "Found $DOC_COUNT documentation files"
if [ "$DOC_COUNT" -lt 40 ]; then
echo "Error: Expected at least 40 documentation files, found $DOC_COUNT"
exit 1
fi
echo "✓ Documentation check passed"
- name: Run tests
run: npm test --if-present
- name: Verify npm authentication and OIDC
run: |
echo "=== OIDC Token Debug ==="
echo "GITHUB_REPOSITORY: ${{ github.repository }}"
echo "GITHUB_REF: ${{ github.ref }}"
echo "GITHUB_WORKFLOW_REF: ${{ github.workflow_ref }}"
echo ""
echo "=== Checking npm configuration ==="
npm config list
echo ""
echo "=== Checking .npmrc ==="
cat ~/.npmrc 2>/dev/null || echo "No .npmrc file found"
echo ""
echo "=== Checking package existence ==="
npm view @julianoczkowski/mcp-modus --registry=https://registry.npmjs.org || echo "Package check completed"
- name: Publish to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ""
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.VERSION }}
name: Release v${{ steps.version.outputs.VERSION }}
body: |
## MCP Modus v${{ steps.version.outputs.VERSION }}
### 🔒 Security & Reliability Improvements
- **Pre-bundled Documentation**: All docs included with package - no runtime downloads
- **Enhanced Security**: Removed postinstall hooks for safer installation
- **Offline Operation**: Works completely offline after installation
- **Verified Content**: Documentation verified during CI/CD process
### Features
- 📚 **43 Modus Web Components** documented with complete API references
- 🎨 **6 Design Rule categories** (colors, icons, spacing, typography, breakpoints, radius/stroke)
- ⚙️ **5 Setup guides** (HTML, React, themes, testing, universal rules)
- 🔧 **10 MCP tools** for comprehensive development support
- 🖥️ **Multi-IDE support** (Claude Desktop, Cursor, VS Code)
- 📱 **Secure offline operation** with bundled documentation
### Installation Options
**Option 1: NPX (Recommended)**
```json
{
"mcpServers": {
"modus-docs": {
"command": "npx",
"args": ["-y", "@julianoczkowski/mcp-modus"]
}
}
}
```
**Option 2: Global Install**
```bash
npm install -g @julianoczkowski/mcp-modus
```
### Package Stats
- 54 total documentation files (43 components + 6 rules + 5 setup)
- ~80 KB compressed
- ~350 KB unpacked
- 10 MCP tools across 3 categories
draft: false
prerelease: false