Automated build, test, and release pipeline using GitHub Actions.
Push/PR to main or develop:
ββββββββββββ¬ββββββββββββ¬βββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ
β Lint β Typecheck β Unit Tests β E2E CLI β E2E TUI β E2E Web β Storybook β
ββββββββββββ΄ββββββββββββ΄βββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ
ββββββββββββ¬ββββββββββ¬βββββββββββββββββββ
β Gitleaks β Semgrep β Security Enforce β
ββββββββββββ΄ββββββββββ΄βββββββββββββββββββ
(all run in parallel)
On PR only:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PR Check β commitlint over the PR range + PR-title check β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
On push to main only (after ALL jobs pass, including security):
βββββββββββββ
β Release β β npm publish + GitHub release + `v<version>` tag
βββββββββββββ
On published GitHub Release (created by Release) or manual dispatch:
ββββββββββββββββββ
β Docker Publish β β build image + push to ghcr.io
ββββββββββββββββββ
All of these live in ci.yml and run on Node 22.
| Job | Description |
|---|---|
| Lint & Format | pnpm lint, pnpm format:check, pnpm tsp:compile |
| Type Check | pnpm generate, fails if the regenerated output differs from what is committed, then pnpm typecheck |
| Unit Tests | pnpm tsp:compile, then test:unit + test:int (ubuntu + windows matrix) |
| E2E CLI | pnpm build:release, then test:e2e:cli (ubuntu + windows matrix) |
| E2E (TUI) | pnpm build:release, then test:e2e:tui |
| E2E (Web) | pnpm build:release, Playwright chromium install, then test:e2e:web |
| Storybook Build | pnpm check:stories, then pnpm build:storybook |
| Electron | Desktop installers for macOS/Windows/Linux (matrix), uploaded as artifacts |
| Electron Apps-Only | Second matrix building the apps-only shell variant |
Windows jobs in ci.yml and shep-e2e.yml use windows-2022 (Visual Studio 2022).
GitHub migrated windows-latest to Visual Studio 2026, which the node-gyp 11.5
bundled with pnpm 10.33.0 cannot detect. Pinning the image keeps native dependency
installation working when a prebuilt binary is unavailable. The ci.yml matrix
retains its windows-latest check names because branch protection requires them;
matrix.runner selects the actual Windows image.
The Windows CLI job also forces better-sqlite3 to rebuild from source and runs
an in-memory SQL query before building the CLI. This checks the fallback compiler
path on every run, including when dependency installation uses cached binaries.
Revisit the image pin when the package manager bundles a node-gyp version that
supports Visual Studio 2026 (support was added in 12.1.0).
See the GitHub runner migration notice
and node-gyp changelog.
Note: Docker images are not built in the CI matrix. They are published by the separate
docker-publish.ymlworkflow, which fires on the published GitHub Release β deliberately not on thev*tag push (see Docker Images).
Security scanners run in parallel and block releases on main:
| Scanner | Tool | Severity Filter |
|---|---|---|
| Gitleaks | Secret detection (API keys, passwords, tokens) | All findings |
| Semgrep | SAST rules (p/typescript, p/javascript, p/security-audit) |
All findings |
| Security Enforce | pnpm dev:cli security enforce --output json β supply-chain/governance posture |
Gates release |
Note: Gitleaks uses the CLI directly (not gitleaks-action) because the GitHub Action requires a paid license for organizations.
A fourth job, Security Summary, depends on Gitleaks and Semgrep. It is not a scanner: it runs only on pull requests and only when one of those two failed, and posts (or updates) a single tagged PR comment summarising which scanner failed.
pr-check.yml runs on
pull_request: [opened, synchronize, reopened, edited] and does two things:
amannn/action-semantic-pull-request@v5, with
requireScope: false β a scope is optionalclaude.yml is not an automatic PR
reviewer. It is an on-demand responder: it triggers on issue_comment,
pull_request_review_comment, pull_request_review and issues, and its job
only runs when the comment, review or issue body/title contains @claude.
It then runs anthropics/claude-code-action@v1, which carries out whatever the
mentioning comment asked for.
Required Secret: CLAUDE_CODE_OAUTH_TOKEN (org-level)
Runs after all parallel jobs pass, including security scanners. Uses semantic-release to:
@shepai/cli packageDocker Publish)chore(release): <version> [skip ci]v<version> tag - versioned tag pointing at the release commitDocker images are built and pushed by the separate
docker-publish.yml workflow,
which fires on the published GitHub Release (and can be run manually via
workflow dispatch). It is deliberately NOT triggered by the v* tag push:
semantic-release tags the chore(release): β¦ [skip ci] commit, and GitHub
Actions skips workflows for tags pointing at a [skip ci] commit. The
release event is immune to [skip ci], so it fires reliably.
Images are published to GitHub Container Registry (ghcr.io):
ghcr.io/shep-ai/shep
| Trigger | Tags |
|---|---|
Published Release (v* tag) |
latest, 1.2.3, 1.2, 1, sha-<full-commit-sha> |
| Manual dispatch (main) | latest, sha-<full-commit-sha> |
Tags come from docker/metadata-action@v5 (type=semver Γ3, type=sha with a
sha- prefix and full format, plus latest on the default branch or a v* tag).
# Latest stable
docker pull ghcr.io/shep-ai/shep:latest
docker run ghcr.io/shep-ai/shep --version
# Specific version
docker pull ghcr.io/shep-ai/shep:v1.0.0
# Specific commit (for testing)
docker pull ghcr.io/shep-ai/shep:sha-abc123...
node:22-alpine (~180MB)shep (UID 1001)node dist/src/presentation/cli/index.jsReleases are fully automated based on Conventional Commits:
| Commit Type | Version Bump | Example |
|---|---|---|
feat: |
Minor (0.X.0) | feat(cli): add analyze command |
fix: |
Patch (0.0.X) | fix(agents): resolve memory leak |
perf: |
Patch | perf(db): optimize query performance |
refactor: |
Patch | refactor(domain): simplify state management |
BREAKING CHANGE |
Major (X.0.0) | Footer in commit message |
Commits that donβt trigger releases:
docs:, style:, test:, build:, ci:, chore:If needed, you can trigger a release manually:
# Ensure you're on main with latest changes
git checkout main && git pull
# Run semantic-release in dry-run mode first
npx semantic-release --dry-run
# If satisfied, run actual release (requires NPM_TOKEN)
NPM_TOKEN=xxx GITHUB_TOKEN=xxx npx semantic-release
| File | Purpose |
|---|---|
.github/workflows/ci.yml |
Main CI/CD workflow (lint, typecheck, tests, storybook, electron, security, release) β push/pull_request on main and develop |
.github/workflows/pr-check.yml |
commitlint over the PR range + PR-title check β pull_request |
.github/workflows/claude.yml |
On-demand Claude Code responder β issue_comment, pull_request_review_comment, pull_request_review, issues, gated on an @claude mention |
.github/workflows/docker-publish.yml |
Build & push the image to ghcr.io β release: [published] + workflow_dispatch |
.github/workflows/deploy.yml |
Bumps core.pin in the shep-ai/shep-cloud repo to the new CLI SHA β push to main |
.github/workflows/shep-e2e.yml |
Full feat new β feat ls β feat show lifecycle across platforms/agents β hourly schedule + workflow_dispatch |
.github/workflows/agent-request.yml |
Free-form βdescribe a fix, get a PRβ agent run β workflow_dispatch only |
.github/workflows/label-by-lane.yml |
Runs shep contributors groom-issue to label new issues β issues: [opened] |
.github/workflows/welcome-first-time-contributor.yml |
Runs shep contributors welcome-pr β pull_request: [opened] (on open, not on merge) |
.github/workflows/generate-good-first-issues.yml |
Good-first-issue generation β schedule disabled; workflow_dispatch only |
release.config.mjs |
semantic-release plugins and settings |
Dockerfile |
Multi-stage build for production image |
.dockerignore |
Files excluded from Docker build context |
commitlint.config.mjs |
Commit message validation rules |
docker-publish.yml only runs on a
published release or a manual dispatch. A Dockerfile change therefore is not
exercised by CI until it is on main and released.docker/build-push-action@v6 with
cache-from: type=gha / cache-to: type=gha,mode=max, on top of the
multi-stage Dockerfile.ci.yml groups runs by workflow + ref with
cancel-in-progress: $:
develop cancel their own in-flight runsmain runs are never cancelled[skip ci],
which is how semantic-releaseβs own release commit avoids re-triggering it| Secret | Purpose | Where to Set |
|---|---|---|
GITHUB_TOKEN |
Automatic, provided by GitHub Actions | Built-in |
NPM_TOKEN |
Publishing to npm registry | Repository secrets |
RELEASE_TOKEN |
PAT used by semantic-release to create the release, and by docker-publish.yml to push to ghcr.io (GITHUB_TOKEN 403s on the first org package publish) |
Repository secrets |
CLAUDE_CODE_OAUTH_TOKEN |
@claude responder + agent-request workflow |
Organization secrets |
CURSOR_API_KEY |
Cursor agent in the scheduled shep-e2e run |
Repository secrets |
SHEP_CLOUD_PAT |
deploy.yml push to the shep-cloud repo |
Repository secrets |
SLACK_WEBHOOK |
semantic-release Slack release notification | Repository secrets |
Recommended settings for main:
Lint & Format, Type Check, Unit Tests (β¦), all E2E jobs, Storybook Build, and the Gitleaks / Semgrep / Security Enforce jobsmain branch[skip ci].dockerignore isnβt excluding required filespnpm-lock.yaml is committedpackage.json enginesNPM_TOKEN secret is set and validpackage.json wasnβt manually bumpeddocker build -t shep-cli .
docker run shep-cli --version
npx semantic-release --dry-run
echo "feat(cli): add new command" | npx commitlint
Update when:
Related files: