Skip to content

Merge pull request #20 from GenAIwithMS/ci/update-workflow #11

Merge pull request #20 from GenAIwithMS/ci/update-workflow

Merge pull request #20 from GenAIwithMS/ci/update-workflow #11

name: Publish to Smithery
on:
push:
branches:
- main
workflow_dispatch:
jobs:
smithery-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install All Dependencies
run: npm install
- name: Compile and Bundle via esbuild
run: |
npm run build
npm run bundle
# Flattens dist/index.js to the root folder of the archive
- name: Stage Bundle Elements
run: |
mkdir staging
cp dist/index.js staging/index.js
cp manifest.json staging/
cp smithery.yaml staging/
cp package.json staging/
cp README.md staging/
# Zips the staging contents directly so manifest.json is at the root entry point
- name: Build Valid .mcpb Zip Archive
run: |
cd staging
zip -r ../twitter-mcp.mcpb .
cd ..
ls -lh twitter-mcp.mcpb
- name: Install Smithery CLI
run: npm install -g smithery@latest
- name: Publish to Smithery Registry
run: |
smithery mcp publish ./twitter-mcp.mcpb -n muhammadsiddiq/twitter-mcp
env:
SMITHERY_API_KEY: ${{ secrets.SMITHERY_TOKEN }}