mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2026-08-24 10:14:12 -05:00
Bumps the all group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 6 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: all ... Signed-off-by: dependabot[bot] <support@github.com>
66 lines
2.1 KiB
YAML
66 lines
2.1 KiB
YAML
name: Publish to MCP Registry
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'website/api/mcp/**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish MCP Server
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
id-token: write # Required for OIDC authentication
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
|
|
with:
|
|
fetch-depth: 0 # Fetch all tags
|
|
|
|
- name: Extract version from latest git tag
|
|
id: version
|
|
run: |
|
|
# Get the latest git tag (without 'v' prefix)
|
|
VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
|
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
echo "Using version from git tag: $VERSION"
|
|
|
|
- name: Update server.json version
|
|
run: |
|
|
cd website/api/mcp
|
|
jq --arg v "${{ steps.version.outputs.version }}" '.version = $v' server.json > tmp.json && mv tmp.json server.json
|
|
echo "Updated server.json version to ${{ steps.version.outputs.version }}"
|
|
cat server.json
|
|
|
|
- name: Validate server.json
|
|
run: |
|
|
cd website/api
|
|
npm ci
|
|
cd mcp
|
|
node validate-server.js
|
|
|
|
- name: Install MCP Publisher
|
|
run: |
|
|
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar -xzf -
|
|
chmod +x mcp-publisher
|
|
./mcp-publisher --version
|
|
|
|
- name: Login to MCP Registry
|
|
env:
|
|
MCP_REGISTRY_PEM: ${{ secrets.MCP_REGISTRY_PEM }}
|
|
run: |
|
|
echo "$MCP_REGISTRY_PEM" > key.pem
|
|
PRIVATE_KEY=$(openssl pkey -in key.pem -noout -text | grep -A3 "priv:" | tail -n +2 | tr -d ' :\n')
|
|
./mcp-publisher login dns --domain ohmyposh.dev --private-key "$PRIVATE_KEY"
|
|
rm -f key.pem
|
|
|
|
- name: Publish to MCP Registry
|
|
run: |
|
|
cd website/api/mcp
|
|
../../../mcp-publisher publish
|