@@ -132,6 +132,31 @@ This MCP server contains data for 186+ Drupal tools sourced from the Drupal Tool
132132
133133## Publishing
134134
135+ ### Required GitHub Repository Secrets
136+
137+ To enable automated publishing, you need to set up the following secrets in your GitHub repository:
138+
139+ 1 . ** NPM_TOKEN** (Required for npm publishing)
140+ - Go to: https://www.npmjs.com
141+ - Create an account or log in
142+ - Generate an access token: Account Settings → Access Tokens → Generate New Token
143+ - Set the token with automation permissions
144+ - Add to GitHub: Repository Settings → Secrets and variables → Actions → New repository secret
145+ - Name: ` NPM_TOKEN `
146+ - Value: Your npm access token
147+
148+ 2 . ** GITHUB_TOKEN** (Already provided by GitHub Actions)
149+ - This is automatically available in workflows with ` permissions: contents: write `
150+
151+ ### Package Name
152+
153+ ** Package Name:** ` @drupaltools/mcp `
154+
155+ This is the name you'll use to install the package:
156+ ``` bash
157+ npx @drupaltools/mcp
158+ ```
159+
135160### Manual Publishing
136161
137162From the project root:
@@ -152,19 +177,66 @@ npm run publish:npm
152177
153178### Automated Publishing via GitHub Actions
154179
180+ #### Option 1: Tag-based Publishing (Recommended)
1551811 . Create and push a version tag:
156182 ``` bash
157183 git tag v1.0.0
158184 git push origin v1.0.0
159185 ```
186+ This will automatically trigger the publish workflow
187+
188+ #### Option 2: Manual Trigger
189+ 1 . Go to: Repository → Actions → "Publish to npm"
190+ 2 . Click "Run workflow"
191+ 3 . Enter the version number (e.g., "1.0.0")
192+ 4 . Click "Run workflow"
193+
194+ #### What the workflow does:
195+ - ✅ Builds the MCP package with latest data
196+ - ✅ Runs tests to ensure everything works
197+ - ✅ Publishes to npm registry
198+ - ✅ Creates a GitHub release
199+ - ✅ Updates version numbers in package.json files
200+
201+ ### Publishing for the First Time
202+
203+ 1 . ** Set up npm account** (if you don't have one):
204+ - Visit https://www.npmjs.com
205+ - Click "Sign up"
206+ - Verify your email address
207+
208+ 2 . ** Generate npm token** :
209+ - Log in to npm
210+ - Go to Account Settings → Access Tokens
211+ - Click "Generate New Token"
212+ - Name: ` drupaltools-mcp ` (or any descriptive name)
213+ - Select permissions: "Automation"
214+ - Click "Generate Token"
215+ - ** Important** : Copy the token immediately (you won't see it again)
216+
217+ 3 . ** Add token to GitHub** :
218+ - Go to your GitHub repository
219+ - Settings → Secrets and variables → Actions
220+ - Click "New repository secret"
221+ - Name: ` NPM_TOKEN `
222+ - Value: Paste your npm token
223+ - Click "Add secret"
224+
225+ 4 . ** Publish the package** :
226+ ``` bash
227+ cd mcp-package
228+ npm publish
229+ ```
160230
161- 2 . Or manually trigger the workflow in GitHub Actions with a version number
231+ ### Post-Publishing Verification
162232
163- 3 . The workflow will:
164- - Build the package
165- - Run tests
166- - Publish to npm
167- - Create a GitHub release
233+ After publishing, verify the package:
234+ 1 . Visit https://www.npmjs.com/package/@drupaltools/mcp
235+ 2 . Test installation:
236+ ``` bash
237+ npx @drupaltools/mcp@latest --version
238+ ```
239+ 3 . The package should be publicly available for anyone to use
168240
169241## Contributing
170242
0 commit comments