Skip to content

Release MCP Docs Server to Github Packages #5

Release MCP Docs Server to Github Packages

Release MCP Docs Server to Github Packages #5

Workflow file for this run

name: "Release MCP Docs Server to Github Packages"
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- "src/**"
- "package.json"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
pull-requests: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
mcp-docs:
- 'src/**'
- 'package.json'
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://npm.pkg.github.com"
scope: "@homebase-id"
- name: Authenticate to Github packages
run: |
echo "@homebase-id:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
# Set git User & Bump the version
- name: Bump version
run: |
git config user.name github-actions
git config user.email github-actions@github.com
npm version prerelease --preid=beta
- run: bun install --frozen-lockfile
- name: Publish to GitHub Packages
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Push the version increment back into the repo
- name: Restore npmrc updates
run: |
git restore .npmrc
- name: Create PR for NPM version bump
id: version-bump
uses: peter-evans/create-pull-request@v6
with:
branch-suffix: short-commit-hash
commit-message: "Bump version for @homebase-id/mcp-docs-server"
title: "Bump version for @homebase-id/mcp-docs-server"
body: |
Automated version bump for MCP Docs Server
This PR was automatically created after publishing a new version to GitHub Packages.