Skip to content
UniKit

GitHub Actions workflow generator

Generate a CI/CD workflow config: pick triggers (push, PR, tag, schedule, manual), a Node, Python, Go or Java runtime, dependency caching and a multi-version / multi-OS matrix, and get a ready-to-commit .github/workflows/*.yml.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Workflow settings

Triggers
Runtime
Package manager
Runners (selecting several builds a matrix)
Steps
Cache dependenciesAdds the cache option to the setup step; Node caches the package manager store

.github/workflows/ci.yml

Save the output as .github/workflows/ci.yml and it runs; the YAML comes from js-yaml so GitHub parses it directly.

name: CI
'on':
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: npm
      - name: Install dependencies
        run: npm ci
      - name: Lint
        run: npm run lint
      - name: Test
        run: npm test
      - name: Build
        run: npm run build

Statistics

Steps6
Matrix machines1
Triggers2
Lines0

What this tool does

  • Bootstrap CI for a new repository: pick push and pull_request, choose Node 20, tick lint / test / build, and commit the ci.yml it prints instead of copying syntax out of the docs.
  • Check version compatibility: enter 18, 20, 22 and select ubuntu plus windows to get a build matrix that covers every combination in one run.
  • Nightly or manual pipelines: add a schedule trigger (say Monday 03:00) or workflow_dispatch for nightly builds, scheduled jobs and manual artifact uploads.
  • Switch from npm to pnpm or yarn: the install command and the cache option in the setup step follow your choice, so you never hand-edit setup-node.

Example

Input

Workflow name CI; triggers push + pull_request on main; Node runtime, version 20; steps checkout + install + test; caching enabled

Output

name: CI
'on':
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: npm
      - name: Install dependencies
        run: npm ci
      - name: Test
        run: npm test

js-yaml serializes the document, so the `on` key is quoted and YAML 1.1 parsers cannot mistake it for the boolean true.

Frequently asked questions

Where does the generated file go?

Into .github/workflows/ in your repository; the file name is up to you, for example ci.yml. GitHub only reads YAML files in that folder, and the workflow runs as soon as one of the triggers matches.

Why does more than one version produce a matrix?

When versions or runners number more than one, they are written as strategy.matrix and the setup step uses ${{ matrix.node-version }} / ${{ matrix.os }}. The matrix is capped at 12 machines so a workflow cannot fan out into hundreds of jobs.

How is dependency caching enabled?

Caching adds the cache option to setup-node, setup-python, setup-go or setup-java (your package manager for Node, pip for Python, maven for Java). It only speeds up installs and never changes build output.

How do I write the cron expression?

Five fields: minute hour day month weekday, so 0 3 * * 1 means every Monday at 03:00 UTC. GitHub schedules run in UTC with a five minute minimum, and a wrong field count is reported before you copy the file.

Which tags does the tag trigger match?

Selecting tag emits push.tags: [v*], matching releases such as v1.0.0. If push is selected too, both land in the same push trigger with branches and tags side by side, which is what the Actions syntax requires.

Keywords:github actionsci cdworkflow ymlpipelinebuild matrixgithub 工作流持续集成持续部署自动化构建矩阵构建

Related tools