Skip to main content
Glama

Swit MCP Server

by TykanN
publish.yml3.72 kB
name: Publish to NPM on: push: branches: - master workflow_dispatch: inputs: force_deploy: description: 'Force deploy regardless of version' required: false default: false type: boolean permissions: contents: write jobs: check-version: runs-on: ubuntu-latest outputs: version-changed: ${{ steps.version-check.outputs.changed }} version: ${{ steps.version-check.outputs.version }} steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 2 - name: Check if version changed id: version-check run: | # Get current version CURRENT_VERSION=$(node -p "require('./package.json').version") # Get previous version (from previous commit) git checkout HEAD~1 -- package.json 2>/dev/null || echo "No previous package.json" if [ -f package.json ]; then PREVIOUS_VERSION=$(node -p "require('./package.json').version" 2>/dev/null || echo "0.0.0") else PREVIOUS_VERSION="0.0.0" fi # Restore current package.json git checkout HEAD -- package.json echo "Previous version: $PREVIOUS_VERSION" echo "Current version: $CURRENT_VERSION" if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then echo "changed=true" >> $GITHUB_OUTPUT echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT echo "Version changed from $PREVIOUS_VERSION to $CURRENT_VERSION" else echo "changed=false" >> $GITHUB_OUTPUT echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT echo "Version unchanged: $CURRENT_VERSION" fi publish: needs: check-version if: needs.check-version.outputs.version-changed == 'true' || github.event.inputs.force_deploy == 'true' runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' registry-url: 'https://registry.npmjs.org' - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: 9 run_install: false - name: Get pnpm store directory shell: bash run: | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - name: Setup pnpm cache uses: actions/cache@v4 with: path: ${{ env.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - name: Install dependencies run: pnpm install --frozen-lockfile - name: Run tests run: pnpm test - name: Build package run: pnpm run build - name: Publish to NPM run: pnpm publish --access public --no-git-checks env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Create GitHub release uses: softprops/action-gh-release@v2 with: tag_name: v${{ needs.check-version.outputs.version }} name: Release v${{ needs.check-version.outputs.version }} body: | 🚀 Release version ${{ needs.check-version.outputs.version }} ## Changes in this release - Package version updated to ${{ needs.check-version.outputs.version }} - Available on NPM: `npx -y swit-mcp@${{ needs.check-version.outputs.version }}` ## Installation ```bash npx -y swit-mcp ``` draft: false prerelease: false

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TykanN/swit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server