Meigma template repository for GitHub Actions written in TypeScript.
The action skeleton comes from GitHub's canonical actions/typescript-action template (see UPSTREAM.md), rebased onto the Meigma stack:
- mise manages every tool (Node, moon) with a
committed, fail-closed
mise.lock. - moon is the task runner and CI gate; CI runs
moon ciagainstsystembinaries that mise puts on PATH. - release-please drives
releases: Conventional Commits → release PR → draft release + protected
vX.Y.Ztag → human publishes → thevNmajor tag advances automatically. - Pinned-by-SHA workflows with
permissions: {}defaults, weekly Dependabot, dual MIT/Apache-2.0 license.
mise installmise.lock records per-platform URLs and checksums for every tool, and
settings.locked makes installation fail closed when a platform lacks a
pre-resolved entry. To bump a tool, edit its version in mise.toml, then:
mise lock --platform linux-x64,linux-arm64,macos-x64,macos-arm64and commit mise.toml + mise.lock together. (Note: moon's aqua package does
not currently publish a macos-x64 build, so Intel macOS is not covered by the
lockfile.)
moon run root:check # the full CI gate: format-check, lint, test, check-dist, audit
moon run root:format # prettier --write
moon run root:lint # eslint
moon run root:test # jest
moon run root:package # rebuild dist/ (cacheable)
moon run root:check-dist # rebuild dist/ and fail if it differs from the committed copy
moon ci --summary minimal # exactly what CI runsWithout moon, the equivalent npm scripts still work: npm run ci mirrors
root:check, and npm run all is the upstream
format/lint/test/coverage/package sweep.
npm audit runs inside root:check; if new upstream advisories break unrelated
PRs too often, remove root:audit from check.deps in moon.yml
(one line).
The template ships upstream's wait sample: input milliseconds, output time.
Code lives in src/, tests in __tests__/ with mock fixtures in
__fixtures__/.
The bundled action (dist/index.js) is committed — that is what
action.yml executes. The contract: edit src/, run moon run root:package,
commit dist/ with your change. CI's check-dist task rebuilds the bundle and
fails if the committed copy is stale.
- Merge Conventional Commits to
main; release-please maintains a release PR. - Merging the release PR bumps
package.json/CHANGELOG.mdand creates a draft GitHub release plus the protectedvX.Y.Ztag. - A human inspects and publishes the draft.
- Publication triggers the Major Version Tag workflow, which force-moves the
vNcompatibility tag souses: meigma/<repo>@v1consumers pick up the release.
Repo requirements (org-level): vars.MEIGMA_RELEASE_APP_ID,
secrets.MEIGMA_RELEASE_APP_PRIVATE_KEY, and a protected v* tag ruleset with
a bypass for the release app.
If your action pins a paired CLI version in action.yml, add
"extra-files": [{ "type": "generic", "path": "action.yml" }] to
release-please-config.json and a
# x-release-please-version marker on the input default so releases keep it in
sync.
package.json:name,description,homepage,repository,bugs.action.yml:name,description,author,branding, real inputs/outputs; replacesrc/+__tests__/with your implementation.release-please-config.json:package-name.moon.yml:project.title/project.description.- This README: rewrite for your action (usage example, inputs/outputs table).
SECURITY.md: advisories URL.- Pick a license posture (keep dual MIT/Apache-2.0 or trim).
- Repo settings: mark squash-only merges, protected
v*tag ruleset with the release-app bypass, Dependabot labels (dependencies,github-actions,javascript).
See CONTRIBUTING.md and SECURITY.md.
Dual-licensed under MIT or Apache-2.0, at your option. Upstream template code is MIT (LICENSE.upstream).