ci: install bun in release job so AI changelog generates

Merged
RI
3mo ago
+5-0

What

  • Add oven-sh/setup-bun@v2 to the tag publish job in .github/workflows/build.yml, so the existing Generate AI changelog step can actually run.

Why

Every release from 8.3.5 to 8.3.12 shipped with the placeholder body:

_Changelog was not generated automatically for this release._

and a self-referential compare link (compare/8.3.12...8.3.12), because steps.changelog.outputs.result, from_tag, and to_tag were all empty.

The wiring other Cap-go plugin repos use (id: changelog, continue-on-error: true, Cloudflare secrets, fetch-depth: 0, and the action-gh-release body referencing steps.changelog.outputs.*) was already present here. The step itself failed. From the 8.3.12 run (31664632096):

Run bun run changelog:ai
  CLOUDFLARE_API_TOKEN: ***
  CLOUDFLARE_ACCOUNT_ID: ***
/home/runner/work/_temp/….sh: line 1: bun: command not found
##[error]Process completed with exit code 127

The deploy job installs with npm and never set up bun, unlike test.yml and sync-upstream.yml which both use oven-sh/setup-bun@v2. Because the step is continue-on-error: true, the run stayed green and the release quietly fell back to the placeholder.

How

One added step. Nothing else needed:

  • scripts/generate-ai-changelog.mjs is byte-for-byte identical to the one in Cap-go/capacitor-inappbrowser, which produces real changelogs today, so the script, model, and Cloudflare response handling are fine.
  • Both Cloudflare secrets are already present and non-empty (the run log masks each as ***).
  • Checkout already uses fetch-depth: 0, so git describe finds the previous tag.
  • The action-gh-release body already consumes steps.changelog.outputs.result and builds the compare link from from_tag/to_tag.

Kept the plus-specific publish path untouched: npm workspace install, npm run build --workspace=core|cli, and the four-package @capacitor-plus/* publish loop. bump_version.yml and its lerna flow are unchanged, so package CHANGELOG.md files stay lerna-managed. timeout-minutes: 10 is unchanged.

Testing

Reproduced and verified the fix locally against real repo history at tag 8.3.12:

  • Confirmed the failure mode in CI logs: bun: command not found, exit 127, immediately before the release step emitted the placeholder body and the 8.3.12...8.3.12 link.
  • Installed bun and ran bun run changelog:ai, which now resolves and executes the script (Range: 8.3.11..8.3.12), failing only at the Cloudflare call because this sandbox has no credentials.
  • Stubbed the Cloudflare response and re-ran the script to confirm it writes all three outputs in valid GITHUB_OUTPUT form, including the heredoc-delimited multiline body:
result<<changelog_1786607743800
## Fixed
- Android inset regression on rotation
changelog_1786607743800
from_tag=8.3.11
to_tag=8.3.12
  • Parsed the workflow YAML and confirmed step ordering (checkout → node → bun → install → build → changelog → publish → release) and timeout-minutes: 10.

Not Tested

  • A real tag push. The end-to-end result, including the live Cloudflare Workers AI call, can only be confirmed on the next release.
  • git diff --stat under the filter: blob:none partial clone relies on lazy blob fetching. It works in capacitor-inappbrowser with the same checkout options and identical script, but it is untested in this repo's CI.

Authored by an AI agent (Cursor).

Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Chores
    • Updated the deployment workflow to prepare the required runtime before generating AI-assisted changelogs.