Comp AI CRM is an open source, CRM designed for AI agents. Agentic-first CRM.
TypeScript
chore(release): set up release process and CI configuration
Lewis Carhartc125443b05e2
diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.jsonnew file mode 100644index 00000000..1c56072d--- /dev/null+++ b/.github/.release-please-manifest.json@@ -0,0 +1,3 @@+{+ ".": "0.0.0"+}diff --git a/.github/release-please-config.json b/.github/release-please-config.jsonnew file mode 100644index 00000000..9064d568--- /dev/null+++ b/.github/release-please-config.json@@ -0,0 +1,32 @@+{+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",+ "packages": {+ ".": {+ "release-type": "node",+ "package-name": "crm",+ "changelog-path": "CHANGELOG.md",+ "bump-minor-pre-major": true,+ "draft": false,+ "prerelease": false,+ "include-component-in-tag": false,+ "changelog-sections": [+ { "type": "feat", "section": "Features" },+ { "type": "fix", "section": "Fixes" },+ { "type": "perf", "section": "Performance" },+ { "type": "refactor", "section": "Refactors" },+ { "type": "docs", "section": "Documentation" },+ { "type": "revert", "section": "Reverts" },+ { "type": "deps", "section": "Dependencies" },+ { "type": "chore", "hidden": true },+ { "type": "test", "hidden": true },+ { "type": "ci", "hidden": true },+ { "type": "build", "hidden": true },+ { "type": "style", "hidden": true }+ ]+ }+ },+ "bootstrap-sha": "64f154b086cbad6cac232357dc21c954543ef217",+ "separate-pull-requests": false,+ "pull-request-title-pattern": "chore(release): ${version}",+ "pull-request-header": "The changelog below is what will be published as the release notes. Edit the commit subjects, not this PR body — the body is regenerated on every push to main."+}diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlnew file mode 100644index 00000000..0f81d72e--- /dev/null+++ b/.github/workflows/ci.yml@@ -0,0 +1,63 @@+name: CI++on:+ pull_request:+ push:+ branches: [main]++concurrency:+ group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}++permissions:+ contents: read++env:+ TURBO_TELEMETRY_DISABLED: 1+ DO_NOT_TRACK: 1++jobs:+ check:+ name: check-types, lint, test+ runs-on: ubuntu-24.04+ timeout-minutes: 20++ services:+ postgres:+ image: postgres:17-alpine+ env:+ POSTGRES_USER: postgres+ POSTGRES_PASSWORD: postgres+ POSTGRES_DB: crm+ ports:+ - 5432:5432+ options: >-+ --health-cmd "pg_isready -U postgres -d crm"+ --health-interval 3s+ --health-timeout 5s+ --health-retries 20++ env:+ DATABASE_URL: postgresql://postgres:postgres@localhost:5432/crm?schema=public+ ALLOWED_SIGN_IN: example.com+ BETTER_AUTH_SECRET: ci-only-secret-regenerate-for-any-real-deployment+ API_URL: http://localhost:3001+ APP_URL: http://localhost:3000++ steps:+ - uses: actions/checkout@v5++ - uses: oven-sh/setup-bun@v2+ with:+ bun-version-file: package.json++ - run: bun install --frozen-lockfile++ - name: Apply migrations+ run: bun run db:deploy++ - run: bun run check-types++ - run: bun run lint++ - run: bun run testdiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlnew file mode 100644index 00000000..8390b366--- /dev/null+++ b/.github/workflows/release.yml@@ -0,0 +1,29 @@+name: Release++on:+ push:+ branches: [main]++concurrency:+ group: release+ cancel-in-progress: false++permissions:+ contents: write+ pull-requests: write++jobs:+ release-please:+ runs-on: ubuntu-24.04+ timeout-minutes: 10+ outputs:+ released: ${{ steps.release.outputs.release_created }}+ tag: ${{ steps.release.outputs.tag_name }}+ version: ${{ steps.release.outputs.version }}+ steps:+ - uses: googleapis/release-please-action@v4+ id: release+ with:+ config-file: .github/release-please-config.json+ manifest-file: .github/.release-please-manifest.json+ token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 5256c291..5e80daff 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -51,6 +51,43 @@ A few things that trip people up:to `apps/api/src/config/env.validation.ts`. A variable that only exists in someone's shell is avariable that breaks the next person's clone.+## Releases++Releases are cut by [release-please](https://github.com/googleapis/release-please), so **your commit+subject is the release note**. Write it for somebody reading the changelog six months from now, not+for the diff.++Subjects follow [Conventional Commits](https://www.conventionalcommits.org/), which the history+already does — `feat(api):`, `fix(db):`, `refactor(agent):`. The type decides both the version bump+and the heading it appears under:++| Subject | Bump | Appears under |+| --- | --- | --- |+| `feat(app): …` | minor | Features |+| `fix(db): …` | patch | Fixes |+| `perf:`, `refactor:`, `docs:`, `revert:` | patch | their own heading |+| `chore:`, `ci:`, `test:`, `build:`, `style:` | none | nothing — deliberately invisible |++Nothing is released by the merge itself. Merging to `main` opens or updates a single+`chore(release): 0.2.0` pull request that accumulates the changelog and bumps the version; **merging+that PR** is what tags `v0.2.0` and publishes the GitHub Release. So the notes are reviewable before+they are public, and a stack of merges is one release rather than five.++Two consequences worth knowing:++- **A release PR with nothing in it is not a bug.** A run of `chore:` and `test:` commits bumps+ nothing, so no PR appears. That is the type doing its job.+- **The release PR does not run CI.** A PR opened by `GITHUB_TOKEN` cannot trigger workflows — that+ is GitHub's own loop guard, not something to work around. It is safe because the PR only ever+ touches `CHANGELOG.md`, the root `version`, and the release manifest, and because CI runs again on+ `main` after it lands. Setting a `RELEASE_PLEASE_TOKEN` secret (a PAT or a GitHub App token) makes+ the PR run CI like any other; the workflow already prefers it and falls back to `GITHUB_TOKEN`, so+ it is an upgrade rather than a requirement.++`main` is expected to be green when a tag is cut, and the thing that guarantees that is **branch+protection requiring the `check-types, lint, test` check** — not the release workflow, which cannot+wait on a run in another workflow.+## House styleThe repo has opinions, and they're written down where the work happens rather than in a stylediff --git a/package.json b/package.jsonindex 3927c45d..ec73b939 100644--- a/package.json+++ b/package.json@@ -2,6 +2,7 @@"name": "crm","private": true,"license": "MIT",+ "version": "0.0.0","scripts": {"build": "turbo run build","dev": "turbo run dev",@@ -26,6 +27,7 @@"engines": {"node": ">=22"},+ "packageManager": "[email protected]","devEngines": {"packageManager": {"name": "bun",