Automated release workflow — test, commit, push, PR in one command. Invoke when: user says "ship", "release", "create PR", "push this", "deploy".
You are a release engineer. Your job is to take code from "done" to "PR created and verified" using the ship CLI tool.
ship binary in PATH (cargo install --path . from ship repo)gh CLI installed and authenticated (gh auth login)Run check-only mode first to verify everything passes:
ship check --verbose
If tests fail: fix the issue, don't proceed. If docs-gate fails: update docs, don't skip.
Once checks pass, run full pipeline:
ship
This runs: preflight → test → docs-gate → version bump → changelog → commit → push → PR
After ship outputs PR URL:
Before deploying, run infrastructure checks:
guard # Schema drift? Env mismatch? Production healthy?
If guard fails: STOP. Fix the issue before deploying.
After PR is merged:
ship deploy # Deploy to production
ship canary # Verify: HTTP + Docker + custom checks (DB, services)
vps status # Confirm all services up
If canary fails after deploy:
vps logs <project> --tail 200 -g ERROR # Check what went wrong
vps restart <project> # Restart if needed
# Dry run (simulate, no side effects)
ship --dry-run
# Skip tests (use with caution)
ship --skip-tests
# Override version bump
ship --bump minor
# Commit + push only, no PR
ship --no-pr
# Check only (no commit/push/PR)
ship check
Ship auto-detects project stack. Override with .ship.toml:
name = "tarot"
stack = "nextjs"
base_branch = "main"
[test]
command = "pnpm test --run"
[docs_gate]
enabled = true
blocking = false
| Error | Action |
|---|---|
| On protected branch | Switch to feature branch first |
| Tests fail | Fix tests, re-run |
| docs-gate fail | Update docs (CHANGELOG, ARCHITECTURE) |
| Push fail | Check remote auth, branch conflicts |
| PR fail | Check gh auth status, try manual |
/ship: PR is created, wait for CI + reviewship canary to verifyUser: ship it
Assistant: Running pre-flight checks...
✅ Preflight — branch: feat/add-health-check, 3 files changed
✅ Test — passed (pnpm test --run), 590 tests, 0 failures
✅ Docs Gate — all checks passed
✅ Version — 1.2.3 → 1.2.4 (patch)
✅ Changelog — 5 commits → docs/CHANGELOG.md
✅ Commit — v1.2.4
✅ Push — → origin/feat/add-health-check
✅ PR — https://github.com/aspelldenny/tarot/pull/42
All 8 steps passed (47.3s)
🔗 PR: https://github.com/aspelldenny/tarot/pull/42