# CI Pipeline Setup

> Sets up a GitHub Actions CI pipeline for Flutter projects.

- Skill: `tomevault-io/ci-pipeline-setup` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/ci-pipeline-setup`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/ci-pipeline-setup/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/ci-pipeline-setup

---


# CI Pipeline Setup Skill

## Overview
Provides a ready‑to‑use GitHub Actions workflow that runs static analysis, unit tests, and optionally publishes the package when a tag is pushed.

## Workflow file (`.github/workflows/ci.yml`)
```yaml
name: CI

on:
  push:
    branches: [main]
    tags: ['v*']
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: subosito/flutter-action@v2
        with:
          channel: stable
      - name: Install dependencies
        run: flutter pub get
      - name: Analyze
        run: flutter analyze
      - name: Run tests
        run: flutter test
      - name: Generate release notes (optional)
        if: startsWith(github.ref, 'refs/tags/')
        run: |
          dart run tool/generate_release_notes.dart
      - name: Publish to pub.dev (optional)
        if: startsWith(github.ref, 'refs/tags/')
        env:
          PUB_DEV_TOKEN: ${{ secrets.PUB_DEV_TOKEN }}
        run: |
          dart pub publish --force
```

## How to add it
1. Create the file at `.github/workflows/ci.yml` in the repository.
2. Ensure the `tool/generate_release_notes.dart` script exists (see `release_notes_generator` skill).
3. Add a secret `PUB_DEV_TOKEN` in the repo settings if you want automatic publishing.

## Customisation
- Change the Flutter channel (`stable`, `beta`, `master`).
- Add additional steps such as `flutter build apk` for CI artifacts.
- Enable matrix builds for multiple OSes.

---

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/xdaijobu) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

