forked from GLips/Figma-Context-MCP
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (57 loc) · 2.08 KB
/
release.yml
File metadata and controls
70 lines (57 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
id-token: write # Required for npm OIDC trusted publishing
jobs:
release-please:
if: ${{ github.repository_owner == 'GLips' }}
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: pnpm/action-setup@v4
with:
version: 10.10.0
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: "https://registry.npmjs.org"
if: ${{ steps.release.outputs.release_created }}
- name: Install dependencies
run: pnpm install
if: ${{ steps.release.outputs.release_created }}
- name: Type check
run: pnpm type-check
if: ${{ steps.release.outputs.release_created }}
- name: Build
run: pnpm build
if: ${{ steps.release.outputs.release_created }}
- name: Publish to npm
run: pnpm publish --no-git-checks
env:
NODE_ENV: production
if: ${{ steps.release.outputs.release_created }}
- name: Update server.json version
run: |
VERSION="${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}"
jq --arg v "$VERSION" '.version = $v | .packages[0].version = $v' server.json > server.tmp && mv server.tmp server.json
if: ${{ steps.release.outputs.release_created }}
- name: Install mcp-publisher
run: |
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_amd64.tar.gz" | tar xz mcp-publisher
if: ${{ steps.release.outputs.release_created }}
- name: Publish to MCP Registry
run: |
./mcp-publisher login github-oidc
./mcp-publisher publish
if: ${{ steps.release.outputs.release_created }}