-
-
Notifications
You must be signed in to change notification settings - Fork 403
149 lines (133 loc) · 5.38 KB
/
Copy pathplugin-skill-sync.yml
File metadata and controls
149 lines (133 loc) · 5.38 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: plugin-skill-sync
on:
pull_request:
paths:
- "SKILL.md"
- "SKILL.full.md"
- "references/**"
- "dist/**"
- "README.md"
# CLAUDE.md carries a checked copy of the pattern count; without this
# path the count guard never runs on a CLAUDE.md-only edit (PR #106
# had zero check runs - review finding on #111).
- "CLAUDE.md"
- "detector/**"
- "plugins/**"
- ".claude-plugin/**"
- ".codex-plugin/**"
- ".agents/plugins/**"
- "skills/**"
- "assets/**"
- "evals/**"
- "submission/**"
- "OPENAI_PLUGIN.md"
- "PRIVACY.md"
- "TERMS.md"
- "SUPPORT.md"
- "NOTICE.md"
- "LICENSE"
- "cursor-rules/**"
- "scripts/**"
- ".github/workflows/plugin-skill-sync.yml"
push:
branches: [main]
paths:
- "SKILL.md"
- "SKILL.full.md"
- "references/**"
- "dist/**"
- "README.md"
# CLAUDE.md carries a checked copy of the pattern count; without this
# path the count guard never runs on a CLAUDE.md-only edit (PR #106
# had zero check runs - review finding on #111).
- "CLAUDE.md"
- "detector/**"
- "plugins/**"
- ".claude-plugin/**"
- ".codex-plugin/**"
- ".agents/plugins/**"
- "skills/**"
- "assets/**"
- "evals/**"
- "submission/**"
- "OPENAI_PLUGIN.md"
- "PRIVACY.md"
- "TERMS.md"
- "SUPPORT.md"
- "NOTICE.md"
- "LICENSE"
- "cursor-rules/**"
- "scripts/**"
- ".github/workflows/plugin-skill-sync.yml"
permissions:
contents: read
concurrency:
# Pull requests share a stable group so newer commits cancel stale checks.
# Pushes use a unique group and always run to completion.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# merge-base --is-ancestor in validate-openai-plugin.py needs history
fetch-depth: 0
persist-credentials: false
- name: Validate manifest JSON
run: |
python3 -m json.tool .claude-plugin/marketplace.json > /dev/null
python3 -m json.tool plugins/avoid-ai-writing/.claude-plugin/plugin.json > /dev/null
python3 -m json.tool .agents/plugins/marketplace.json > /dev/null
python3 -m json.tool .codex-plugin/plugin.json > /dev/null
python3 -m json.tool skills/avoid-ai-writing-router/references/skill-graph.json > /dev/null
python3 -m json.tool submission/listing.json > /dev/null
python3 -m json.tool submission/reviewer-tests.json > /dev/null
python3 -m json.tool submission/discovery-evals.json > /dev/null
python3 -m json.tool submission/submission-pack.json > /dev/null
- name: Check README pattern count matches references/patterns.md
run: bash scripts/check-pattern-count.sh
- name: Regenerate bundled canonical resources
run: bash scripts/sync-plugin-skill.sh
- name: Regenerate cursor rule
run: bash scripts/sync-cursor-rules.sh
- name: Fail if a generated copy drifted
run: |
if ! git diff --quiet; then
echo "::error::A generated Plugin/Cursor copy is out of sync with its canonical repository source."
echo "Run 'bash scripts/sync-plugin-skill.sh && bash scripts/sync-cursor-rules.sh' and commit the result."
git --no-pager diff --stat
exit 1
fi
echo "generated copies are in sync"
- name: Validate cross-Skill connections
run: |
python3 skills/avoid-ai-writing-router/scripts/validate_connections.test.py
python3 skills/avoid-ai-writing-router/scripts/validate_connections.py .
- name: Validate ChatGPT and Codex plugin
run: |
python3 scripts/validate-openai-plugin.test.py
python3 scripts/validate-openai-plugin.py . --json
- name: Smoke preservation residual detector
run: node scripts/test-preservation-package.js .
- name: Smoke canonical bundled skill commands
run: node scripts/test-canonical-skill-package.js .
- name: Run repository tests
run: npm test
- name: Build deterministic plugin archives
run: |
python3 scripts/package-openai-plugin.py . /tmp/avoid-ai-writing-a.zip --json
python3 scripts/package-openai-plugin.py . /tmp/avoid-ai-writing-b.zip --json
cmp /tmp/avoid-ai-writing-a.zip /tmp/avoid-ai-writing-b.zip
unzip -Z1 /tmp/avoid-ai-writing-a.zip
- name: Validate clean extraction
run: |
rm -rf /tmp/avoid-ai-writing-extracted
mkdir -p /tmp/avoid-ai-writing-extracted
unzip -q /tmp/avoid-ai-writing-a.zip -d /tmp/avoid-ai-writing-extracted
python3 /tmp/avoid-ai-writing-extracted/skills/avoid-ai-writing-router/scripts/validate_connections.py /tmp/avoid-ai-writing-extracted
python3 scripts/validate-openai-plugin.py /tmp/avoid-ai-writing-extracted --json
node scripts/test-preservation-package.js /tmp/avoid-ai-writing-extracted
node scripts/test-canonical-skill-package.js /tmp/avoid-ai-writing-extracted