Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Distribute Custom Tools as Composite GitHub Actions (Without npm Publishing)

Описание и применение

Данный рецепт позволяет распространять небольшие Node‑CLI инструменты как composite GitHub Actions без публикации в npm, используя простую конфигурацию и CI‑проверку тегов.

Задача

Publish small Node CLI tools without npm, avoiding account setup and publishing steps.

Результат

The CLI becomes reusable via a simple uses: line, with CI verifying tag integrity, eliminating npm publishing overhead.

Рабочий процесс

  • Create a repository for the CLI tool
  • Add action.yml with composite configuration and shell steps
  • Use actions/setup-node to install Node
  • Run npm ci and npm run build in the action's directory
  • Execute the tool via node with inputs
  • Commit the repository
  • Tag releases with v1.0.0 and a working v1 tag
  • Push tags to origin
  • Add a CI job that checks the action locally and with the published tag
  • Optional: publish to GitHub Marketplace after refining description

Доказательства

Composite run steps will error if you do not specify shell: for each one.

Источник

Exit codes directly determine CI pass/fail.

Источник

Add a job to CI that references the published tags.

Источник

  • Дата записи: 2026-09-09T01:00:27.708Z