-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (49 loc) · 1.69 KB
/
DeployManual.yml
File metadata and controls
49 lines (49 loc) · 1.69 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
name: Publish to NPM and MCP Registry
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'tag name e.g. beta, latest etc.'
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
scope: '@provartesting'
- name: Install dependencies and build
run: |
npm install -g @salesforce/cli
yarn
yarn prepack
- name: Display file
run: |
cat /home/runner/work/_temp/.npmrc
cat $NPM_CONFIG_USERCONFIG
- name: Publish package on NPM
run: npm publish --tag "$TAG" --access public
env:
TAG: ${{ github.event.inputs.tag || 'latest' }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install mcp-publisher
run: |
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
- name: Sync version into server.json
if: github.event_name == 'release'
run: |
VERSION=${GITHUB_REF#refs/tags/v}
jq --arg v "$VERSION" '.version = $v | .packages[0].version = $v' server.json > server.tmp && mv server.tmp server.json
- name: Authenticate to MCP Registry
run: ./mcp-publisher login github-oidc
- name: Publish to MCP Registry
run: ./mcp-publisher publish