mirror of
https://github.com/conorbronsdon/avoid-ai-writing.git
synced 2026-09-19 01:32:11 +08:00
141 lines
5.0 KiB
YAML
141 lines
5.0 KiB
YAML
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/**"
|
|
- "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/**"
|
|
- "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
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
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
|