Skip to content

build: fix mcp publish #63

build: fix mcp publish

build: fix mcp publish #63

Workflow file for this run

# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Release
on:
push:
branches:
- main
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "lts/*"
cache: "pnpm"
- run: pnpm i
- run: pnpm build
- run: pnpm lint
- run: pnpm check
- run: pnpm test
- run: pnpm ci:package
- run: |
git config --global user.name "googleworkspace-bot"
git config --global user.email "[email protected]"
- uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
id: changesets
env:
GITHUB_TOKEN: ${{secrets.GOOGLEWORKSPACE_BOT_TOKEN}}
OVSX_PAT: ${{secrets.OVSX_PAT}}
VSCE_PAT: ${{secrets.VSCE_PAT}}
with:
title: "chore: release"
commit: "chore: release"
commitMode: github-api
setupGitUser: false
publish: "pnpm ci:publish"
version: "pnpm ci:version"
- name: Publish to MCP Registry
run: |
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.0.0/mcp-publisher_1.0.0_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher && sudo mv mcp-publisher /usr/local/bin/
echo "${{ secrets.MCP_REGISTRY_PRIVATE_KEY }}" > key.pem
mcp-publisher login dns --domain workspace-developer.goog --private-key $(openssl pkey -in key.pem -noout -text | grep -A3 "priv:" | tail -n +2 | tr -d ' :\n')
mcp-publisher publish