Skip to content

Commit 4fc630b

Browse files
authored
Merge branch 'main' into dependabot/go_modules/go.opentelemetry.io/otel/sdk-1.38.0
2 parents 050e631 + c6bb2f5 commit 4fc630b

File tree

6 files changed

+63
-60
lines changed

6 files changed

+63
-60
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v4
2020

2121
- name: Set up Go
22-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #v5
22+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v5
2323
with:
2424
go-version: ${{ env.GO_VERSION }}
2525

@@ -60,10 +60,10 @@ jobs:
6060
runs-on: ubuntu-latest
6161
steps:
6262
- name: Checkout code
63-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
63+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v4
6464

6565
- name: Set up Go
66-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #v5
66+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v5
6767
with:
6868
go-version: ${{ env.GO_VERSION }}
6969

.github/workflows/claude.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
actions: read
2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
29+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v4
3030
with:
3131
fetch-depth: 1
3232

.github/workflows/deploy.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
packages: write
1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
21+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v4
2222

2323
- name: Set up Docker Buildx
2424
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3
@@ -40,7 +40,7 @@ jobs:
4040
type=raw,value=main,enable={{is_default_branch}}
4141
4242
- name: Build and push Docker image
43-
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 #v5
43+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v5
4444
with:
4545
context: .
4646
file: ./Dockerfile
@@ -61,10 +61,10 @@ jobs:
6161
cancel-in-progress: false
6262
steps:
6363
- name: Checkout code
64-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
64+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v4
6565

6666
- name: Setup Go
67-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #v5
67+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v5
6868
with:
6969
go-version: ${{ env.GO_VERSION }}
7070

@@ -74,12 +74,12 @@ jobs:
7474
pulumi-version: ${{ env.PULUMI_VERSION }}
7575

7676
- name: Authenticate to Google Cloud
77-
uses: google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed #v2
77+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 #v2
7878
with:
7979
credentials_json: ${{ secrets.GCP_STAGING_SERVICE_ACCOUNT_KEY }}
8080

8181
- name: Setup Google Cloud SDK
82-
uses: google-github-actions/setup-gcloud@e427ad8a34f8676edf47cf7d7925499adf3eb74f #v2
82+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db #v2
8383
with:
8484
project_id: mcp-registry-staging
8585
install_components: gke-gcloud-auth-plugin
@@ -100,10 +100,10 @@ jobs:
100100
cancel-in-progress: false
101101
steps:
102102
- name: Checkout code
103-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
103+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v4
104104

105105
- name: Setup Go
106-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #v5
106+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v5
107107
with:
108108
go-version: ${{ env.GO_VERSION }}
109109

@@ -113,12 +113,12 @@ jobs:
113113
pulumi-version: ${{ env.PULUMI_VERSION }}
114114

115115
- name: Authenticate to Google Cloud
116-
uses: google-github-actions/auth@c200f3691d83b41bf9bbd8638997a462592937ed #v2
116+
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 #v2
117117
with:
118118
credentials_json: ${{ secrets.GCP_PROD_SERVICE_ACCOUNT_KEY }}
119119

120120
- name: Setup Google Cloud SDK
121-
uses: google-github-actions/setup-gcloud@e427ad8a34f8676edf47cf7d7925499adf3eb74f #v2
121+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db #v2
122122
with:
123123
project_id: mcp-registry-prod
124124
install_components: gke-gcloud-auth-plugin

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
17+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v4
1818
with:
1919
fetch-depth: 0
2020

2121
- name: Set up Go
22-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #v5
22+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v5
2323
with:
2424
go-version: '1.24.x'
2525

@@ -43,7 +43,7 @@ jobs:
4343
needs: goreleaser
4444
steps:
4545
- name: Checkout
46-
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 #v4
46+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v4
4747

4848
- name: Set up Docker Buildx
4949
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3
@@ -65,7 +65,7 @@ jobs:
6565
type=raw,value=latest
6666
6767
- name: Build and push Docker image
68-
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 #v5
68+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 #v5
6969
with:
7070
context: .
7171
file: ./Dockerfile

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
services:
22
registry:
3-
image: registry
3+
image: modelcontextprotocol/registry:dev
4+
pull_policy: never
45
container_name: registry
56
build:
67
dockerfile: Dockerfile

docs/guides/publishing/github-actions.md

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Set up automated MCP server publishing using GitHub Actions.
55
## What You'll Learn
66

77
By the end of this tutorial, you'll have:
8+
89
- A GitHub Actions workflow that automatically publishes your server
910
- Understanding of GitHub OIDC authentication
1011
- Knowledge of best practices for automated publishing
@@ -28,52 +29,52 @@ name: Publish to MCP Registry
2829

2930
on:
3031
push:
31-
tags: ['v*'] # Triggers on version tags like v1.0.0
32+
tags: ["v*"] # Triggers on version tags like v1.0.0
3233

3334
jobs:
3435
publish:
3536
runs-on: ubuntu-latest
3637
permissions:
37-
id-token: write # Required for OIDC authentication
38+
id-token: write # Required for OIDC authentication
3839
contents: read
39-
40+
4041
steps:
4142
- name: Checkout code
4243
uses: actions/checkout@v4
43-
44-
- name: Setup Node.js # Adjust for your language
44+
45+
- name: Setup Node.js # Adjust for your language
4546
uses: actions/setup-node@v4
4647
with:
47-
node-version: '20'
48-
registry-url: 'https://registry.npmjs.org'
49-
48+
node-version: "20"
49+
registry-url: "https://registry.npmjs.org"
50+
5051
- name: Install dependencies
5152
run: npm ci
52-
53+
5354
- name: Run tests
5455
run: npm test
55-
56-
- name: Build package
56+
57+
- name: Build package
5758
run: npm run build
58-
59+
5960
- name: Publish to npm
6061
run: npm publish
6162
env:
6263
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
63-
64+
6465
- name: Install MCP Publisher
6566
run: |
6667
# Build publisher from source (requires Go)
6768
git clone https://github.com/modelcontextprotocol/registry publisher-repo
6869
cd publisher-repo
6970
make publisher
70-
cp cmd/publisher/bin/mcp-publisher ../mcp-publisher
71+
cp bin/mcp-publisher ../mcp-publisher
7172
cd ..
7273
chmod +x mcp-publisher
73-
74+
7475
- name: Login to MCP Registry
7576
run: ./mcp-publisher login github-oidc
76-
77+
7778
- name: Publish to MCP Registry
7879
run: ./mcp-publisher publish
7980
```
@@ -97,8 +98,9 @@ git push origin v1.0.0
9798
```
9899

99100
The workflow will:
101+
100102
1. Run tests
101-
2. Build your package
103+
2. Build your package
102104
3. Publish to npm
103105
4. Automatically authenticate with the MCP Registry
104106
5. Publish updated server.json
@@ -112,7 +114,8 @@ The workflow will:
112114
run: mcp-publisher login github-oidc
113115
```
114116

115-
**Advantages:**
117+
**Advantages:**
118+
116119
- No secrets to manage
117120
- Automatically scoped to your repository
118121
- Most secure option
@@ -150,40 +153,40 @@ name: Publish Python MCP Server
150153
151154
on:
152155
push:
153-
tags: ['v*']
156+
tags: ["v*"]
154157
155158
jobs:
156159
publish:
157160
runs-on: ubuntu-latest
158161
permissions:
159162
id-token: write
160163
contents: read
161-
164+
162165
steps:
163166
- uses: actions/checkout@v4
164-
167+
165168
- name: Setup Python
166169
uses: actions/setup-python@v4
167170
with:
168-
python-version: '3.11'
169-
171+
python-version: "3.11"
172+
170173
- name: Install Poetry
171174
run: pipx install poetry
172-
175+
173176
- name: Build package
174177
run: poetry build
175-
178+
176179
- name: Publish to PyPI
177180
run: poetry publish
178181
env:
179182
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
180-
183+
181184
- name: Install MCP Publisher
182185
run: |
183186
git clone https://github.com/modelcontextprotocol/registry publisher-repo
184187
cd publisher-repo && make publisher && cd ..
185-
cp publisher-repo/cmd/publisher/bin/mcp-publisher mcp-publisher
186-
188+
cp publisher-repo/bin/mcp-publisher mcp-publisher
189+
187190
- name: Publish to MCP Registry
188191
run: |
189192
./mcp-publisher login github-oidc
@@ -197,31 +200,31 @@ name: Publish Docker MCP Server
197200
198201
on:
199202
push:
200-
tags: ['v*']
203+
tags: ["v*"]
201204
202205
jobs:
203206
publish:
204207
runs-on: ubuntu-latest
205208
permissions:
206209
id-token: write
207210
contents: read
208-
211+
209212
steps:
210213
- uses: actions/checkout@v4
211-
214+
212215
- name: Setup Docker Buildx
213216
uses: docker/setup-buildx-action@v3
214-
217+
215218
- name: Login to Docker Hub
216219
uses: docker/login-action@v3
217220
with:
218221
username: ${{ secrets.DOCKER_USERNAME }}
219222
password: ${{ secrets.DOCKER_PASSWORD }}
220-
223+
221224
- name: Extract version
222225
id: version
223226
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
224-
227+
225228
- name: Build and push
226229
uses: docker/build-push-action@v5
227230
with:
@@ -230,20 +233,19 @@ jobs:
230233
tags: yourname/your-server:${{ steps.version.outputs.version }}
231234
labels: |
232235
io.modelcontextprotocol.server.name=io.github.yourname/your-server
233-
236+
234237
- name: Install MCP Publisher
235238
run: |
236239
git clone https://github.com/modelcontextprotocol/registry publisher-repo
237240
cd publisher-repo && make publisher && cd ..
238-
cp publisher-repo/cmd/publisher/bin/mcp-publisher mcp-publisher
239-
241+
cp publisher-repo/bin/mcp-publisher mcp-publisher
242+
240243
- name: Publish to MCP Registry
241244
run: |
242245
./mcp-publisher login github-oidc
243246
./mcp-publisher publish
244247
```
245248

246-
247249
## Best Practices
248250

249251
### 1. Version Alignment
@@ -272,7 +274,6 @@ Only publish to registry after package publishing succeeds:
272274
run: ./mcp-publisher publish
273275
```
274276

275-
276277
## Troubleshooting
277278

278279
**"Publisher binary not found"** - Ensure you download the correct binary for your CI platform (linux/mac/windows).
@@ -286,11 +287,12 @@ Only publish to registry after package publishing succeeds:
286287
## What You've Accomplished
287288

288289
You now have automated MCP server publishing that:
290+
289291
- Triggers on version tags
290292
- Runs tests before publishing
291293
- Publishes to package registry first
292294
- Automatically publishes to MCP Registry
293295
- Handles authentication securely
294296
- Provides failure notifications
295297

296-
Your MCP server publishing is now fully automated - just tag a release and everything happens automatically!
298+
Your MCP server publishing is now fully automated - just tag a release and everything happens automatically!

0 commit comments

Comments
 (0)