Merge branch 'stable' #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Auto-releases on push to main (@next channel) | |
| # For stable (@latest): cherry-pick commits to stable branch, then manually dispatch this workflow | |
| name: 📦 Release MCP | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| # MCP depends on SDK (workspace:*) and imports engine/session code directly. | |
| # Keep in sync with apps/mcp/.releaserc.cjs include list and | |
| # .github/package-impact-map.md. | |
| - 'apps/mcp/**' | |
| - 'packages/sdk/**' | |
| - 'apps/cli/**' | |
| - 'packages/document-api/**' | |
| - 'packages/superdoc/**' | |
| - 'packages/super-editor/**' | |
| - 'packages/layout-engine/**' | |
| - 'packages/word-layout/**' | |
| - 'packages/preset-geometry/**' | |
| - 'shared/**' | |
| - 'pnpm-workspace.yaml' | |
| - '!**/*.md' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| packages: write | |
| concurrency: | |
| group: ${{ github.ref_name == 'stable' && 'release-stable' || format('{0}-{1}', github.workflow, github.ref) }} | |
| cancel-in-progress: ${{ github.ref_name != 'stable' }} | |
| jobs: | |
| release: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Generate token | |
| id: generate_token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.generate_token.outputs.token }} | |
| - name: Refresh stable branch head | |
| if: github.ref_name == 'stable' | |
| run: | | |
| git fetch origin "${{ github.ref_name }}" --tags | |
| git checkout -B "${{ github.ref_name }}" "origin/${{ github.ref_name }}" | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| registry-url: 'https://registry.npmjs.org' | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Generate SDK artifacts | |
| run: pnpm run generate:all | |
| - name: Build superdoc (dependency) | |
| run: pnpm run build:superdoc | |
| - name: Build SDK (dependency) | |
| run: pnpm --prefix packages/sdk/langs/node run build | |
| - name: Build MCP server | |
| run: pnpm --prefix apps/mcp run build | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| LINEAR_TOKEN: ${{ secrets.LINEAR_TOKEN }} | |
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| working-directory: apps/mcp | |
| run: pnpx semantic-release |