afv-library/.github/workflows/validate-skills.yml
Mohan Raj Rajamanickam 2320c50264
ci: publish skills as @salesforce/afv-skills npm package @W-21534193@ (#30)
* ci: update package details and add GitHub workflows for skills validation and release

* chore: update Node version, change license, and refactor skills validation script to TypeScript

* chore: remove unused deps

* fix: npm package

* fix: flatten skills to pass validation

* chore: add validation script to package.json and update GitHub workflow to use it

* chore: enhance skills validation and update workflows for npm publishing

* refactor: streamline skills validation process in workflow and script

* refactor: improve documentation and structure of skills validation script

* implement checks based on jeff's best practices doc

* chore: add pull request template for skill submissions

* chore: update pull request template with additional references and improve automated checks section

* chore: update pull request template to clarify naming convention with a warning for gerund form

* chore: update pull request template to reference skill authoring guide and enhance checklist structure

* chore: enhance GitHub workflows for skills validation and release process

* refactor: improve parsing logic for SKILL.md files and enhance error collection in validation

* chore: update validation checks to enforce character limits for skill names and descriptions

* fix: remove unnecessary whitespace in footer string in validate-skills.ts
2026-03-12 13:41:52 -07:00

37 lines
993 B
YAML

name: Validate Skills
on:
pull_request:
paths:
- 'skills/**'
- 'scripts/validate-skills.ts'
- 'package.json'
- 'package-lock.json'
- '.nvmrc'
- '.github/workflows/validate-skills.yml'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm ci
# Run against only changed skills when skills files are touched; fall back
# to full corpus validation when only tooling files changed, so validator
# regressions against existing skills are caught in the same PR.
- name: Validate skills
run: |
if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q '^skills/'; then
npm run validate:skills -- --changed --base=origin/${{ github.base_ref }}
else
npm run validate:skills
fi