File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Publish to npm
1+ name : Publish
22on :
33 push :
44 tags :
55 - ' v*'
66jobs :
77 publish :
88 runs-on : ubuntu-latest
9+ permissions :
10+ id-token : write
11+ contents : write
912 steps :
1013 - uses : actions/checkout@v5
1114 - uses : actions/setup-node@v5
@@ -21,14 +24,24 @@ jobs:
2124 PUBLISHED=$(npm view "$PKG_NAME@$PKG_VER" version 2>/dev/null || echo "")
2225 if [ "$PUBLISHED" = "$PKG_VER" ]; then
2326 echo "skip=true" >> $GITHUB_OUTPUT
24- echo "Version $PKG_VER already published, skipping."
2527 else
2628 echo "skip=false" >> $GITHUB_OUTPUT
2729 fi
2830 env :
2931 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
30- - run : npm publish --access public
32+ - name : Publish to npm
3133 if : steps.check.outputs.skip != 'true'
32- continue-on-error : true
34+ run : npm publish --access public
3335 env :
3436 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
37+ - name : Create GitHub Release
38+ uses : softprops/action-gh-release@v2
39+ with :
40+ generate_release_notes : true
41+ - name : Install mcp-publisher
42+ run : |
43+ 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
44+ - name : Authenticate to MCP Registry (OIDC)
45+ run : ./mcp-publisher login github-oidc
46+ - name : Publish to MCP Registry
47+ run : ./mcp-publisher publish
You can’t perform that action at this time.
0 commit comments