Skip to content

Commit 1c2aa3d

Browse files
committed
ci: publish-mcp.yml — tag-triggered npm publish for @looptech-ai/understand-quickly-mcp
1 parent 7ee9386 commit 1c2aa3d

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/publish-mcp.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: publish-mcp
2+
3+
on:
4+
push:
5+
tags:
6+
- 'mcp-v*'
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
id-token: write
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
working-directory: mcp
19+
steps:
20+
- uses: actions/checkout@v6
21+
- uses: actions/setup-node@v6
22+
with:
23+
node-version-file: '.nvmrc'
24+
registry-url: 'https://registry.npmjs.org/'
25+
- name: Install
26+
run: npm install --no-audit
27+
- name: Build
28+
run: npm run build
29+
- name: Test
30+
run: npm test
31+
- name: Pack sanity
32+
run: npm pack --dry-run
33+
- name: Publish
34+
env:
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
run: |
37+
if [ -z "${NODE_AUTH_TOKEN}" ]; then
38+
echo "::warning::NPM_TOKEN not set; skipping."
39+
exit 0
40+
fi
41+
npm publish --access public --provenance

0 commit comments

Comments
 (0)