Skip to content
This repository was archived by the owner on May 23, 2026. It is now read-only.

Wire extension package publishing #12

Wire extension package publishing

Wire extension package publishing #12

Workflow file for this run

name: Validate Extensions
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Check upstream-pinned highlight queries
run: bun run scripts/sync-upstream-queries.ts --check
- name: Validate extension manifests
run: |
bun run scripts/package-extensions.ts
bun run scripts/validate.ts
- name: Check manifests.json is up to date
run: |
bun run scripts/generate-manifests.ts
git diff --exit-code manifests.json || (echo "manifests.json is out of date. Run: bun run scripts/generate-manifests.ts" && exit 1)
- name: Check registry.json and index.json are up to date
run: bun run scripts/build-extensions-index.ts --check
- name: Check packaged extensions are up to date
run: git diff --exit-code extensions packages || (echo "Packaged extension artifacts are out of date. Run: bun run scripts/package-extensions.ts" && exit 1)

Check failure on line 36 in .github/workflows/validate.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/validate.yml

Invalid workflow file

You have an error in your yaml syntax on line 36
- name: Validate grammar-sources.json
run: |
node -e "
const sources = require('./grammar-sources.json');
const fs = require('fs');
const dirs = fs.readdirSync('extensions', { withFileTypes: true })
.filter(d => d.isDirectory()).map(d => d.name);
let errors = 0;
for (const dir of dirs) {
const hasHighlights = fs.existsSync('extensions/' + dir + '/highlights.scm');
const hasSource = !!sources[dir];
if (hasHighlights && !hasSource) {
console.warn('Warning: ' + dir + ' has highlights.scm but no entry in grammar-sources.json');
}
}
for (const [lang, src] of Object.entries(sources)) {
if (!fs.existsSync('extensions/' + lang)) {
console.error('Error: grammar-sources.json references ' + lang + ' but extensions/' + lang + '/ does not exist');
errors++;
}
}
if (errors > 0) process.exit(1);
console.log('grammar-sources.json: OK (' + Object.keys(sources).length + ' grammars)');
"