Commit 9f87136
committed
verify-action-build: support Dart-based actions (setup-dart)
Actions such as dart-lang/setup-dart compile their source from Dart to
JavaScript in the `build` npm script (`dart compile js ...`) and then
bundle via a bare `ncc build` invocation in `dist`. The node:slim base
image has neither the Dart SDK nor `@vercel/ncc`, so the build loop
silently fell through to the `npx ncc build --source-map` fallback,
producing an incomplete rebuild missing `main.cjs` and `sig.txt`.
When a `pubspec.yaml` is detected at the repo root, install the Dart
SDK from Google's apt repo, install `@vercel/ncc` globally, and run
`dart pub get` so the pubspec dependencies resolve before compilation.
Also add `all` to the list of candidate npm scripts so actions whose
`all` script chains build+package steps (the setup-dart convention)
run as a single step.
With these changes, `verify-action-build --from-pr 739` against
dart-lang/setup-dart@e51d8e571e22 reports "All compiled JavaScript
matches the rebuild".
Generated-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e0f0ac7 commit 9f87136
1 file changed
Lines changed: 25 additions & 1 deletion
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
35 | 59 | | |
36 | 60 | | |
37 | 61 | | |
| |||
193 | 217 | | |
194 | 218 | | |
195 | 219 | | |
196 | | - | |
| 220 | + | |
197 | 221 | | |
198 | 222 | | |
199 | 223 | | |
| |||
0 commit comments