Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/workflows/publish-claude-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Publish Claude plugin

# Claude's plugin directory reads the plugin from the root of the claude-plugin
# branch. Each package version bump publishes plugins/exa there as one commit,
# as does the first run, which creates the branch. Run the workflow manually to
# publish a plugin-only change between releases.

on:
push:
branches:
- main
paths:
- package.json
- .github/workflows/publish-claude-plugin.yml
workflow_dispatch:

permissions:
contents: write

concurrency:
group: publish-claude-plugin
cancel-in-progress: false

jobs:
publish:
name: Publish plugins/exa to the claude-plugin branch
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
env:
BRANCH: claude-plugin

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check whether to publish
id: release
env:
EVENT_BEFORE: ${{ github.event.before }}
EVENT_NAME: ${{ github.event_name }}
run: |
set -euo pipefail
if [[ "${EVENT_NAME}" == "workflow_dispatch" ]]; then
echo "publish=true" >> "${GITHUB_OUTPUT}"
exit 0
fi
if ! git ls-remote --exit-code --heads origin "${BRANCH}" > /dev/null; then
echo "${BRANCH} does not exist yet; publishing to create it"
echo "publish=true" >> "${GITHUB_OUTPUT}"
exit 0
fi
previous_version="$(git show "${EVENT_BEFORE}:package.json" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>process.stdout.write(JSON.parse(s).version))')"
current_version="$(node -p 'require("./package.json").version')"
if [[ "${previous_version}" == "${current_version}" ]]; then
echo "package.json version unchanged (${current_version}); skipping publication"
echo "publish=false" >> "${GITHUB_OUTPUT}"
else
echo "package version changed ${previous_version} -> ${current_version}"
echo "publish=true" >> "${GITHUB_OUTPUT}"
fi
- name: Publish
if: steps.release.outputs.publish == 'true'
env:
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
run: |
set -euo pipefail
tree="$(git rev-parse "HEAD:plugins/exa")"
parent_args=()
if git ls-remote --exit-code --heads origin "${BRANCH}" > /dev/null; then
git fetch --depth=1 origin "${BRANCH}"
parent="$(git rev-parse FETCH_HEAD)"
if [[ "$(git rev-parse "${parent}^{tree}")" == "${tree}" ]]; then
echo "${BRANCH} already matches plugins/exa at ${GITHUB_SHA}." | tee -a "${GITHUB_STEP_SUMMARY}"
exit 0
fi
parent_args=(-p "${parent}")
fi
commit="$(git commit-tree "${tree}" "${parent_args[@]}" -m "Publish plugins/exa from ${GITHUB_SHA}")"
git push origin "${commit}:refs/heads/${BRANCH}"
echo "Published plugins/exa at ${GITHUB_SHA} to ${BRANCH} as ${commit}." | tee -a "${GITHUB_STEP_SUMMARY}"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Exa Agent requires authentication (OAuth or an [API key](https://dashboard.exa.a

## Agent Skills

Skills live in [`skills/`](./skills/) and load with Agent Plugin installs. The Claude plugin in [`plugins/exa/`](./plugins/exa/) ships a copy of them; `npm test` fails when the copy drifts.
Skills live in [`skills/`](./skills/) and load with Agent Plugin installs. The Claude plugin in [`plugins/exa/`](./plugins/exa/) ships a copy of them; `npm test` fails when the copy drifts. Each package version bump on `main` publishes `plugins/exa/` to the root of the [`claude-plugin`](https://github.com/exa-labs/exa-mcp-server/tree/claude-plugin) branch, which Claude's plugin directory reads. To publish a plugin-only change between releases, run the `Publish Claude plugin` workflow manually.

| Skill | Path | Use when |
| --- | --- | --- |
Expand Down
2 changes: 1 addition & 1 deletion plugins/exa/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"homepage": "https://docs.exa.ai/reference/exa-mcp",
"repository": "https://github.com/exa-labs/exa-mcp-server",
"license": "MIT",
"icon": "./assets/exa.svg",
"icon": "./assets/icon.png",
"privacyPolicyUrl": "https://exa.ai/privacy-policy",
"mcpServers": {
"exa": {
Expand Down
4 changes: 0 additions & 4 deletions plugins/exa/assets/exa.svg

This file was deleted.

Binary file added plugins/exa/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading