跳至主要內容
kitlocal.dev

CI/CD 流程產生器

本機執行

100% 在你的瀏覽器中處理。輸入與輸出絕不會離開你的裝置。

產生 GitHub Actions 與 GitLab CI 流程設定。

Pipeline 執行步驟
GitHub Actions 工作流程 YAML
name: Node.js Pipeline

on:
  push:
    branches: ["main", "develop"]
  pull_request:
    branches: ["main", "develop"]

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: ["18.x"]

    steps:
    - uses: actions/checkout@v4
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v4
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - name: Execute Clean Installation
      run: npm ci
    - name: Run Core Test Boundaries
      run: npm test
    - name: Compile Pipeline Release Target
      run: npm run build
將設定儲存至本機 .github/workflows/main.yml