diff --git a/DEPLOY.md b/DEPLOY.md index f16dd3e1..a653bff8 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -293,8 +293,8 @@ App (`github-tracker`) and MCP server (`github-tracker-mcp`) releases are automa ### How releases work -1. **Conventional commits on `main` → Release PR:** Every push to `main` triggers `.github/workflows/release.yml`, which mints a short-lived installation token via `actions/create-github-app-token` and runs `googleapis/release-please-action`. Using a GitHub App token (rather than `GITHUB_TOKEN`) ensures `pull_request` CI workflows run automatically on the proposed release PR. -2. **Bootstrap (`1.0.0`) and post-release cleanup:** `release-please-config.json` sets `"bootstrap-sha"` to `c63711d42eb125da7be9016a0d853a1cf8c6534d` and `"release-as": "1.0.0"` on the root `.` package. If only hidden commit types (`ci:`, `chore:`, `docs:`, `test:`, `refactor:`) exist after `bootstrap-sha`, release-please will wait for a `feat:`/`fix:`/`perf:` commit—or a commit with a `Release-As: 1.0.0` footer—before opening the initial root release PR. **After the first `github-tracker@1.0.0` release PR merges, remove `"release-as": "1.0.0"` from `release-please-config.json` in a `chore(release):` commit** so subsequent releases increment normally from commits. +1. **Conventional commits on `main` → Per-component Release PRs:** Every push to `main` triggers `.github/workflows/release.yml`, which mints a short-lived installation token via `actions/create-github-app-token` and runs `googleapis/release-please-action`. With `"separate-pull-requests": true` in `release-please-config.json`, `release-please` maintains separate release PRs for `github-tracker` and `github-tracker-mcp` so either package can be released independently. Using a GitHub App token (rather than `GITHUB_TOKEN`) ensures `pull_request` CI workflows run automatically on the proposed release PRs. +2. **Bootstrap SHA (`c63711d`):** `release-please-config.json` sets `"bootstrap-sha"` to `c63711d42eb125da7be9016a0d853a1cf8c6534d` so `release-please` only scans commits after that baseline when computing version bumps (`0.1.0` → `0.1.1`/`0.2.0` for `github-tracker`, `0.1.1` → `0.1.2`/`0.2.0` for `github-tracker-mcp`). 3. **Merging the Release PR:** When a release PR merges to `main`, `release-please` creates the git tag (`github-tracker@x.y.z` and/or `github-tracker-mcp@x.y.z`), writes `CHANGELOG.md` (and `mcp/CHANGELOG.md`), and publishes the GitHub Release: - When the root `github-tracker` package is released (`release_created == 'true'`), the downstream `deploy` job in `release.yml` invokes `.github/workflows/deploy.yml` (`workflow_call`) at the new `github-tracker@x.y.z` tag, running full verification (`typecheck`, `lint`, `test`, WAF smoke, `test:e2e`), `pnpm validate:deploy`, `pnpm run build`, and `wrangler deploy`. - When `mcp--release_created` is `'true'`, the downstream `publish-mcp` job in `release.yml` checks out the new `github-tracker-mcp@x.y.z` tag, runs `pnpm typecheck`, `pnpm build`, and `pnpm test`, and publishes `github-tracker-mcp` to npm with OIDC provenance (`id-token: write`, no `NPM_TOKEN`). diff --git a/mcp/tests/version.test.ts b/mcp/tests/version.test.ts index 8f952575..845956c3 100644 --- a/mcp/tests/version.test.ts +++ b/mcp/tests/version.test.ts @@ -16,11 +16,13 @@ interface ReleasePleaseManifest { interface ReleasePleasePackageConfig { component?: string; + "release-as"?: string; "extra-files"?: string[]; "exclude-paths"?: string[]; } interface ReleasePleaseConfig { + "separate-pull-requests"?: boolean; packages: { ".": ReleasePleasePackageConfig; mcp: ReleasePleasePackageConfig; @@ -58,7 +60,9 @@ describe("MCP and release-please version synchronization", () => { const config = readJson("release-please-config.json") as ReleasePleaseConfig; expect(rootPkg.version).toBe(manifest["."]); + expect(config["separate-pull-requests"]).toBe(true); expect(config.packages["."]?.component).toBe(rootPkg.name); + expect(config.packages["."]["release-as"]).toBeUndefined(); expect(config.packages.mcp?.component).toBe(mcpPkg.name); expect(config.packages.mcp["extra-files"]).toContain("src/index.ts"); expect(config.packages["."]["exclude-paths"]).toContain("mcp"); diff --git a/release-please-config.json b/release-please-config.json index 1a58bdc6..d08e2a91 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -4,6 +4,7 @@ "include-v-in-tag": false, "tag-separator": "@", "include-component-in-tag": true, + "separate-pull-requests": true, "bootstrap-sha": "c63711d42eb125da7be9016a0d853a1cf8c6534d", "changelog-sections": [ { "type": "feat", "section": "Features" }, @@ -21,7 +22,6 @@ "packages": { ".": { "component": "github-tracker", - "release-as": "1.0.0", "exclude-paths": ["mcp"], "changelog-path": "CHANGELOG.md" },