mirror of
https://github.com/beilunyang/moemail.git
synced 2026-06-22 07:43:47 +08:00
ci: add Publish MCP workflow
Mirror publish-cli.yml for @moemail/mcp: trigger on mcp-v* tags or manual dispatch, install + bun build, then npm publish --access public using secrets.NPM_TOKEN. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
39
.github/workflows/publish-mcp.yml
vendored
Normal file
39
.github/workflows/publish-mcp.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Publish MCP
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'mcp-v*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 9
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
|
||||
- name: Install MCP dependencies
|
||||
run: cd packages/mcp && pnpm install
|
||||
|
||||
- name: Build
|
||||
run: cd packages/mcp && bun build ./src/index.ts --outdir ./dist --target=node
|
||||
|
||||
- name: Publish to npm
|
||||
run: cd packages/mcp && npm publish --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
Reference in New Issue
Block a user