Skip to content

Commit 02724cf

Browse files
committed
refactor: schema-driven action definitions with single source of truth
Introduce common/action-schema package that lets each action define inputs and outputs once in a schema.ts file, then derives TypeScript types, runtime parsing, and action.yml generation from it. - Add action-schema library: types, parser, runner, shared schemas, and action.yml generator - Add schema.ts to all 13 actions, replacing manual input extraction - Wire action.yml generation into npm build pipeline - Add CI checks that fail on stale action.yml or dist/ files - Deduplicate compiler prefix removal, setup inputs, and compiler outputs via shared helpers (createSetupInputs, createCompilerOutputs, createCompilerPrefixRemover) - Auto-discover schema actions instead of hardcoded list
1 parent 0788de7 commit 02724cf

File tree

108 files changed

+10703
-3828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+10703
-3828
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,29 @@ jobs:
5353
- name: Lint
5454
run: npm run lint
5555

56+
- name: Check action.yml files
57+
if: matrix.os == 'ubuntu-latest'
58+
run: |
59+
# npm install already ran prepare (which regenerates action.yml from schemas).
60+
# If any action.yml differs from what is committed, the schema is out of sync.
61+
if ! git diff --quiet -- '*/action.yml'; then
62+
echo "::error::action.yml files are out of date. Run 'npm run build' and commit the updated action.yml files."
63+
git diff --name-only -- '*/action.yml'
64+
exit 1
65+
fi
66+
echo "action.yml check passed"
67+
5668
- name: Check dist bundles
5769
if: matrix.os == 'ubuntu-latest'
5870
run: |
5971
# npm install already ran prepare (which rebuilds all workspaces).
6072
# If any dist/ file differs from what is committed, the bundle is stale.
61-
if git diff --quiet -- '*/dist/'; then
62-
echo "Dist bundle check passed"
63-
else
64-
echo "::warning::dist/ files are out of date. Run 'npm run build' and commit the updated dist/ files."
65-
echo "Out-of-date files:"
73+
if ! git diff --quiet -- '*/dist/'; then
74+
echo "::error::dist/ files are out of date. Run 'npm run build' and commit the updated dist/ files."
6675
git diff --name-only -- '*/dist/'
76+
exit 1
6777
fi
78+
echo "Dist bundle check passed"
6879
6980
# ===========================================================================
7081
# Action integration tests

0 commit comments

Comments
 (0)