Serialization
The GitHub Actions lexicon serializes resources into .github/workflows/*.yml YAML files.
Keys use kebab-case for job properties and snake_case for trigger event names.
Building
Section titled “Building”Run chant build to produce workflow YAML from your declarations:
chant build src/ --output .github/workflows/ci.yml# Or build all workflow fileschant buildThe generated file includes:
name:— workflow display nameon:— trigger events (push, pull_request, schedule, workflow_dispatch, etc.)permissions:— workflow-level GITHUB_TOKEN permissionsjobs:— job definitions with kebab-case keys
Key conversions
Section titled “Key conversions”| Chant (TypeScript) | YAML output | Rule |
|---|---|---|
export const buildApp = new Job({...}) | jobs: build-app: | Export name → kebab-case job key |
"runs-on": "ubuntu-latest" | runs-on: ubuntu-latest | Property names match GitHub spec |
timeoutMinutes: 15 | timeout-minutes: 15 | camelCase → kebab-case for job properties |
new Step({ uses: "actions/checkout@v4" }) | - uses: actions/checkout@v4 | Steps serialize as sequence entries |
Validating locally
Section titled “Validating locally”The output is standard GitHub Actions YAML. Validate locally with act or push to GitHub:
# Using act for local testingact -W .github/workflows/ci.yml
# Using GitHub's workflow validation (requires push)git add .github/workflows/ci.ymlgit pushCompatibility
Section titled “Compatibility”The output is compatible with:
- GitHub Actions (any GitHub.com or GitHub Enterprise Server)
actlocal runner- VS Code GitHub Actions extension
- Any tool that processes
.github/workflows/*.ymlfiles