Skip to main content
Glama
release.yml5.53 kB
name: Release on: # Triggers when release-please creates a release release: types: [published] # Allow manual trigger for emergency releases workflow_dispatch: inputs: skip_npm: description: 'Skip npm publish' required: false default: false type: boolean permissions: contents: write issues: write pull-requests: write id-token: write jobs: publish: name: Build & Publish runs-on: ubuntu-latest if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 ref: prod lfs: true - name: Setup Git LFS run: | git lfs install git lfs pull - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20.x' registry-url: 'https://registry.npmjs.org' cache: 'npm' - name: Configure Git run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - name: Install dependencies run: npm ci - name: Run validation run: npm run validate - name: Build production with fresh docs run: npm run build:prod env: NODE_OPTIONS: --max-old-space-size=6144 - name: Update npm run: npm install -g npm@latest - name: Publish to npm if: ${{ github.event.inputs.skip_npm != 'true' }} run: npm publish --provenance --access public --ignore-scripts env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Prepare database release artifacts env: RELEASE_TAG: ${{ github.event.release.tag_name }} run: | VERSION=${RELEASE_TAG#v} echo "Generating manifest for version $VERSION" # Regenerate manifest to ensure it matches the release version npm run db:manifest -- --version "$VERSION" --changelog "Release $RELEASE_TAG" mkdir -p release-artifacts cp data/mcmodding-docs.db release-artifacts/ cp data/db-manifest.json release-artifacts/db-manifest.json echo "📦 Release artifacts:" ls -lh release-artifacts/ - name: Upload database to release uses: softprops/action-gh-release@v1 with: tag_name: ${{ github.event.release.tag_name || format('v{0}', env.VERSION) }} files: | release-artifacts/mcmodding-docs.db release-artifacts/db-manifest.json append_body: true body: | --- ## 🗄️ Database Release | File | Description | |------|-------------| | `mcmodding-docs.db` | Complete documentation index with semantic embeddings | | `db-manifest.json` | Version manifest with SHA256 hash verification | **Auto-Update:** The MCP will automatically detect and download this version on next startup. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VERSION: ${{ github.event.release.tag_name }} - name: Log release summary run: | VERSION=$(node -p "require('./package.json').version") echo "## 🎉 Release Published Successfully!" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "| Component | Status |" >> $GITHUB_STEP_SUMMARY echo "|-----------|--------|" >> $GITHUB_STEP_SUMMARY echo "| Version | \`v$VERSION\` |" >> $GITHUB_STEP_SUMMARY echo "| npm | ✅ Published |" >> $GITHUB_STEP_SUMMARY echo "| GitHub Release | ✅ Created |" >> $GITHUB_STEP_SUMMARY echo "| Database | ✅ Uploaded |" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "### 📦 Artifacts" >> $GITHUB_STEP_SUMMARY echo "- \`mcmodding-docs.db\` - Documentation index" >> $GITHUB_STEP_SUMMARY echo "- \`db-manifest.json\` - Version manifest" >> $GITHUB_STEP_SUMMARY # Sync prod back to dev after release sync-to-dev: name: Sync to Dev runs-on: ubuntu-latest needs: publish if: success() steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 ref: prod lfs: true - name: Setup Git LFS run: | git lfs install git lfs pull - name: Configure Git run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - name: Create sync PR to dev uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: 'chore: sync prod to dev after release' title: 'chore: sync release changes back to dev' body: | ## 🔄 Post-Release Sync This PR syncs the release changes from `prod` back to `dev`: - Updated `package.json` version - Updated `CHANGELOG.md` - Updated `.release-please-manifest.json` - Updated `data/mcmodding-docs.db` (via Git LFS) - Updated `data/db-manifest.json` **Auto-merge recommended** to keep branches in sync. branch: sync/prod-to-dev base: dev delete-branch: true labels: 'sync,automated'

Latest Blog Posts

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/OGMatrix/mcmodding-mcp'

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