-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.94 KB
/
Copy pathvalidate-plugin.yml
File metadata and controls
53 lines (45 loc) · 1.94 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
50
51
52
53
name: Validate Claude Plugin
# Runs Anthropic's own `claude plugin validate --strict` — the authoritative
# validator, not a reconstruction of it — against both manifests at this
# repo's root.
#
# This file is composed and synced from scope3data/agentic-api's own
# .github/workflows/validate-claude-plugin.yml and .nvmrc by
# scripts/plugin-distribution/claude-plugin-mirror — do not hand-edit it
# here, the next sync overwrites it. See
# https://github.com/scope3data/agentic-api/blob/main/docs/developing/claude-plugin-mirror.md.
#
# `claude plugin validate --strict <dir>` validates only one manifest per
# invocation, and picks marketplace.json over plugin.json when a directory
# has both — so this workflow runs two explicit steps, one per manifest,
# rather than a single `claude plugin validate --strict .`.
#
# CLAUDE_CODE_VERSION is pinned, not @latest, so this check is reproducible;
# it is kept in sync with the source repo's own pinned version by the
# composer, never hand-edited here.
on:
pull_request:
branches: [main]
permissions:
contents: read
env:
CLAUDE_CODE_VERSION: 2.1.251
jobs:
validate-claude-plugin:
name: Validate Claude Plugin
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '26.9.0'
- name: Validate plugin manifests
run: |-
set -euo pipefail
while IFS= read -r manifest; do
npx --yes "@anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}" plugin validate --strict "$manifest"
done < <(find plugins -path '*/.claude-plugin/plugin.json' -type f | sort)
- name: Validate marketplace manifest
run: npx --yes "@anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}" plugin validate --strict .claude-plugin/marketplace.json