From 8734c9d44e3276396a84e4ff0d4f67c344311ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=BE=E5=B1=B1=E8=B2=B4=E8=87=B3?= Date: Mon, 8 Jun 2026 15:04:18 +0900 Subject: [PATCH 1/2] ci(release): include public/schemas in the docs-bump PR allowlist The docs-bump job regenerates basou-site with `pnpm gen:docs`, which writes two roots: the version-coupled mdx under src/content/docs and the verbatim JSON Schema artifacts under public/schemas (served at basou.dev/schemas/). The create-pull-request add-paths allowlist only listed src/content/docs, so on a release that changes a schema the regenerated schema files were dropped from the PR while the mdx that references them was included. basou-site's gen:docs:check then failed the build on the drifted, unstaged schemas (observed on the v0.7.0 bump PR). Add public/schemas to all three places the allowlist is expressed: the create-pull-request add-paths, the change-detection diff, and the outside-allowlist warning exclude, so schema-changing releases stage the regenerated artifacts. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6142f4e3..be5472aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -283,7 +283,7 @@ jobs: done pnpm gen:docs # Decide on a bump using only the paths the PR will actually stage. - if git diff --quiet -- package.json pnpm-lock.yaml src/content/docs; then + if git diff --quiet -- package.json pnpm-lock.yaml src/content/docs public/schemas; then echo "::notice::basou-site is already at @basou/core + @basou/cli @${version}; nothing to bump." echo "changed=false" >> "$GITHUB_OUTPUT" else @@ -292,7 +292,7 @@ jobs: fi # Surface anything generated outside the committed allowlist so it is # not silently dropped from the PR. - if ! git diff --quiet -- . ':!package.json' ':!pnpm-lock.yaml' ':!src/content/docs'; then + if ! git diff --quiet -- . ':!package.json' ':!pnpm-lock.yaml' ':!src/content/docs' ':!public/schemas'; then echo "::warning::Changes outside the docs allowlist were produced; they will not be included in the PR." fi @@ -305,10 +305,16 @@ jobs: base: main branch: bump/basou-${{ steps.bump.outputs.version }} delete-branch: true + # Stage exactly what `pnpm gen:docs` regenerates: the version-coupled + # mdx under src/content/docs and the verbatim JSON Schema artifacts + # under public/schemas (served at basou.dev/schemas/). Both move + # together with a release, so both must be staged or basou-site's + # gen:docs:check fails on the drifted, unstaged schemas. add-paths: | package.json pnpm-lock.yaml src/content/docs/** + public/schemas/** commit-message: 'chore(deps): bump @basou/core + @basou/cli to ${{ steps.bump.outputs.version }} and regenerate docs' title: 'chore(deps): bump @basou/core + @basou/cli to ${{ steps.bump.outputs.version }} and regenerate docs' body: | From 03957908715fca0033abbb39ed4054d267064576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=BE=E5=B1=B1=E8=B2=B4=E8=87=B3?= Date: Mon, 8 Jun 2026 15:05:46 +0900 Subject: [PATCH 2/2] ci(release): bump @basou/sdk alongside core and cli in the docs-bump PR The docs-bump job pinned @basou/core and @basou/cli to the released version but left @basou/sdk untouched, so basou-site's gen:docs read the SDK package version from a stale @basou/sdk and the generated sdk.mdx (and basou.dev/sdk/) reported a version one release behind. The SDK read-API version is separate (BASOU_SDK_VERSION) and is unaffected. Add @basou/sdk to the pinned bump so the package version shown in the SDK docs tracks the release, and update the progress messages, PR title/body, and step name to match. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index be5472aa..e8c3173b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -172,8 +172,9 @@ jobs: # ========================================================== # 4. update-docs-site — after the npm packages publish, open a pull - # request on the basou-site repo that bumps its pinned @basou/core - # dependency to this release and regenerates the version-coupled docs + # request on the basou-site repo that bumps its pinned @basou/core, + # @basou/cli, and @basou/sdk dependencies to this release and + # regenerates the version-coupled docs # (the install-page and landing-page version) from the freshly # published package. basou-site's own review/merge gate and Cloudflare # deploy take it from there. @@ -254,7 +255,7 @@ jobs: with: node-version-file: basou-site/.nvmrc - - name: Bump @basou/core + @basou/cli and regenerate docs + - name: Bump @basou/core + @basou/cli + @basou/sdk and regenerate docs id: bump if: steps.guard.outputs.enabled == 'true' working-directory: basou-site @@ -271,20 +272,20 @@ jobs: # Pin exactly to the version just published by the jobs above. npm # may need a moment to propagate the new version, so retry briefly. for attempt in 1 2 3 4 5; do - if pnpm add -E "@basou/core@${version}" "@basou/cli@${version}"; then + if pnpm add -E "@basou/core@${version}" "@basou/cli@${version}" "@basou/sdk@${version}"; then break fi if [ "$attempt" -eq 5 ]; then - echo "::error::@basou/core@${version} / @basou/cli@${version} are not installable after retries." + echo "::error::@basou/core@${version} / @basou/cli@${version} / @basou/sdk@${version} are not installable after retries." exit 1 fi - echo "Attempt ${attempt} failed; waiting for npm to propagate @basou/core@${version} / @basou/cli@${version}..." + echo "Attempt ${attempt} failed; waiting for npm to propagate @basou/core@${version} / @basou/cli@${version} / @basou/sdk@${version}..." sleep 15 done pnpm gen:docs # Decide on a bump using only the paths the PR will actually stage. if git diff --quiet -- package.json pnpm-lock.yaml src/content/docs public/schemas; then - echo "::notice::basou-site is already at @basou/core + @basou/cli @${version}; nothing to bump." + echo "::notice::basou-site is already at @basou/core + @basou/cli + @basou/sdk @${version}; nothing to bump." echo "changed=false" >> "$GITHUB_OUTPUT" else echo "changed=true" >> "$GITHUB_OUTPUT" @@ -315,12 +316,12 @@ jobs: pnpm-lock.yaml src/content/docs/** public/schemas/** - commit-message: 'chore(deps): bump @basou/core + @basou/cli to ${{ steps.bump.outputs.version }} and regenerate docs' - title: 'chore(deps): bump @basou/core + @basou/cli to ${{ steps.bump.outputs.version }} and regenerate docs' + commit-message: 'chore(deps): bump @basou/core + @basou/cli + @basou/sdk to ${{ steps.bump.outputs.version }} and regenerate docs' + title: 'chore(deps): bump @basou/core + @basou/cli + @basou/sdk to ${{ steps.bump.outputs.version }} and regenerate docs' body: | Automated by the basou release pipeline after publishing `${{ github.ref_name }}`. - - Bumps the pinned `@basou/core` and `@basou/cli` dependencies to `${{ steps.bump.outputs.version }}`. + - Bumps the pinned `@basou/core`, `@basou/cli`, and `@basou/sdk` dependencies to `${{ steps.bump.outputs.version }}`. - Regenerates the version-coupled docs regions and the CLI command reference with `pnpm gen:docs`. Review the regenerated docs in the diff, then merge to deploy.