Skip to content

Commit 8012d82

Browse files
committed
chore: add a temporary OIDC-based registry publish workflow
1 parent 80cb5be commit 8012d82

File tree

2 files changed

+41
-15
lines changed

2 files changed

+41
-15
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ jobs:
8080
if: needs.check.outputs.VERSION_EXISTS == 'false'
8181
steps:
8282
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
83-
- uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
84-
id: app-token
85-
with:
86-
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
87-
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
8883
- uses: actions/checkout@v5
8984
- uses: actions/setup-node@v6
9085
with:
@@ -106,13 +101,3 @@ jobs:
106101
GH_TOKEN: ${{ github.token }}
107102
run: |
108103
gh release create ${{ needs.check.outputs.VERSION }} --title "${{ needs.check.outputs.VERSION }}" --generate-notes --target ${{ github.sha }} ${{ (needs.check.outputs.RELEASE_CHANNEL != 'latest' && '--prerelease') || ''}}
109-
110-
- name: Install MCP Publisher
111-
run: |
112-
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
113-
114-
- name: Login to MCP Registry
115-
run: ./mcp-publisher login github --token ${{ steps.app-token.outputs.token }}
116-
117-
- name: Publish to MCP Registry
118-
run: ./mcp-publisher publish
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Publish to MCP Registry
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
runs-on: ubuntu-latest
12+
environment: Production
13+
permissions:
14+
contents: write
15+
id-token: write
16+
needs:
17+
- check
18+
if: needs.check.outputs.VERSION_EXISTS == 'false'
19+
steps:
20+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
21+
- uses: actions/checkout@v5
22+
- uses: actions/setup-node@v6
23+
with:
24+
node-version-file: package.json
25+
registry-url: "https://registry.npmjs.org"
26+
cache: "npm"
27+
28+
- name: Build package
29+
run: |
30+
npm ci
31+
npm run build
32+
33+
- name: Install MCP Publisher
34+
run: |
35+
curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
36+
37+
- name: Login to MCP Registry
38+
run: ./mcp-publisher login github-oidc
39+
40+
- name: Publish to MCP Registry
41+
run: ./mcp-publisher publish

0 commit comments

Comments
 (0)