Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -271,28 +272,28 @@ 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; then
echo "::notice::basou-site is already at @basou/core + @basou/cli @${version}; nothing to bump."
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 + @basou/sdk @${version}; nothing to bump."
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "version=${version}" >> "$GITHUB_OUTPUT"
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

Expand All @@ -305,16 +306,22 @@ 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/**
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'
public/schemas/**
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.