diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1fd5487fab..38b9e74be7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,6 @@ jobs: # On main, checkout credentials must match the release token used by that dry-run. token: ${{ github.ref == 'refs/heads/main' && secrets.RELEASE_TOKEN || github.token }} - uses: ./.github/actions/setup-ci - # - uses: google/wireit@setup-github-actions-caching/v2 - name: Run CI checks env: ELEMENTS_PAGES_BASE_URL: ${{vars.ELEMENTS_PAGES_BASE_URL}} @@ -77,7 +76,6 @@ jobs: fetch-depth: 0 lfs: true - uses: ./.github/actions/setup-ci - # - uses: google/wireit@setup-github-actions-caching/v2 - name: Run Lighthouse tests run: WIREIT_FAILURES=kill pnpm run lighthouse && node ./projects/internals/ci/cache-validate.js lighthouse && node ./projects/internals/ci/metrics.lighthouse.js - name: Write lighthouse job summary @@ -120,6 +118,51 @@ jobs: GITHUB_TOKEN: ${{secrets.RELEASE_TOKEN}} NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: WIREIT_PARALLEL=1 WIREIT_LOGGER=metrics pnpm run release + - name: Upload MCP server manifest + uses: actions/upload-artifact@v7 + with: + name: mcp-server + retention-days: 1 + path: projects/cli/server.json + + publish-mcp: + needs: release + runs-on: ubuntu-latest + permissions: + id-token: write + concurrency: mcp-registry-publish + steps: + - name: Download MCP server manifest + uses: actions/download-artifact@v8 + with: + name: mcp-server + path: projects/cli + - name: Check MCP Registry + id: registry + run: | + path=$(jq -r '[.name, .version] | map(@uri) | join("/versions/")' projects/cli/server.json) + status=$(curl --silent --show-error --output /dev/null --write-out '%{http_code}' \ + --retry 3 --retry-all-errors --connect-timeout 10 --max-time 30 \ + "https://registry.modelcontextprotocol.io/v0.1/servers/$path") + + case "$status" in + 200) publish=false ;; + 404) publish=true ;; + *) + echo "Unexpected MCP Registry response: HTTP $status" >&2 + exit 1 + ;; + esac + echo "publish=$publish" >> "$GITHUB_OUTPUT" + - name: Publish to MCP Registry + if: steps.registry.outputs.publish == 'true' + run: | + curl --fail --location --show-error \ + "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_amd64.tar.gz" \ + | tar xz mcp-publisher + ./mcp-publisher validate projects/cli/server.json + ./mcp-publisher login github-oidc + ./mcp-publisher publish projects/cli/server.json deploy-pages: needs: ci @@ -131,9 +174,7 @@ jobs: environment: name: github-pages url: ${{steps.deployment.outputs.page_url}} - concurrency: - group: pages - cancel-in-progress: false + concurrency: pages steps: - name: Deploy to GitHub Pages id: deployment diff --git a/projects/cli/README.md b/projects/cli/README.md index 706b5a8488..b1c59db4d3 100644 --- a/projects/cli/README.md +++ b/projects/cli/README.md @@ -52,7 +52,7 @@ npm install -g @nvidia-elements/cli | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | `nve` | Show About and help output. | | `nve api.list [format]` | Get a list of all available Elements (`nve-*`) APIs and components. | -| `nve api.get [format]` | Get documentation for known components or attributes by name (`nve-*`). | +| `nve api.get [--format ]` | Get documentation for one to five known components or attributes (`nve-*`). | | `nve api.template.validate