Why
Most of our internal repos (protoMaker, protoCLI, mythxengine, rabbit-hole.io, …) have a near-identical checks.yml workflow that runs the same three steps:
npm run format:check (Prettier)
npm run lint (ESLint)
npm run typecheck (tsc)
Every repo maintains its own copy. They drift — different action versions, different node setups, different cache strategies, different runner labels.
What
Add a reusable workflow (workflow_call) to release-tools that any repo can call:
# in <consumer-repo>/.github/workflows/checks.yml
name: Checks
on: [pull_request, push]
jobs:
preflight:
uses: protoLabsAI/release-tools/.github/workflows/preflight.yml@v1
with:
node-version: '22'
# optional: skip individual steps
run-format: true
run-lint: true
run-typecheck: true
Defaults should target namespace-profile-protolabs-linux so every consumer also gets the right runner choice for free.
Inputs (draft)
| Input |
Default |
Notes |
node-version |
'22' |
passed to actions/setup-node |
run-format |
true |
npm run format:check |
run-lint |
true |
npm run lint |
run-typecheck |
true |
npm run typecheck |
working-directory |
. |
for monorepos with a non-root setup |
install-command |
'npm ci' |
override for pnpm/bun |
Out of scope
- Build / test runs — those vary too much per repo. Separate workflow later if there's a pattern.
Reference
Currently most repos have a hand-rolled version of this. Example: protoMaker checks.yml.
Filed off the back of protoMaker#3650, which finished the release-notes consolidation. The "Pre-flight" pattern is the next biggest duplication.
Why
Most of our internal repos (protoMaker, protoCLI, mythxengine, rabbit-hole.io, …) have a near-identical
checks.ymlworkflow that runs the same three steps:npm run format:check(Prettier)npm run lint(ESLint)npm run typecheck(tsc)Every repo maintains its own copy. They drift — different action versions, different node setups, different cache strategies, different runner labels.
What
Add a reusable workflow (
workflow_call) to release-tools that any repo can call:Defaults should target
namespace-profile-protolabs-linuxso every consumer also gets the right runner choice for free.Inputs (draft)
node-version'22'actions/setup-noderun-formattruenpm run format:checkrun-linttruenpm run lintrun-typechecktruenpm run typecheckworking-directory.install-command'npm ci'Out of scope
Reference
Currently most repos have a hand-rolled version of this. Example: protoMaker checks.yml.
Filed off the back of protoMaker#3650, which finished the release-notes consolidation. The "Pre-flight" pattern is the next biggest duplication.