Skip to content

fix: use pnpm in automatic-api-update workflow#273

Merged
tstirrat15 merged 2 commits into
mainfrom
fix/auto-api-update-pnpm
May 26, 2026
Merged

fix: use pnpm in automatic-api-update workflow#273
tstirrat15 merged 2 commits into
mainfrom
fix/auto-api-update-pnpm

Conversation

@vroldanbet
Copy link
Copy Markdown
Contributor

Summary

  • Workflow automatic-api-update.yaml still ran bahmutov/npm-install@v1 + yarn run buf after the pnpm migration. npm install fired the deprecated prepublish hook (pnpm build), but pnpm wasn't installed → exit 127 (failed run).
  • Switch the workflow to pnpm/action-setup@v6 and pnpm run buf.
  • Rename prepublishprepublishOnly so the build hook fires on publish, not on install.

Test plan

  • Re-trigger an api_update repository_dispatch event and confirm the job reaches "Create Pull Request".
  • Confirm next npm publish (via release) still produces dist/ via the prepublishOnly hook.

The automatic-api-update workflow still used `bahmutov/npm-install@v1`
and `yarn run buf` after the repo migrated to pnpm. `npm install`
triggered the deprecated `prepublish` lifecycle hook, which invokes
`pnpm build`, but pnpm wasn't installed in the runner — failing with
exit 127.

Switch the workflow to `pnpm/action-setup@v6` (mirroring `test.yaml`)
and use `pnpm run buf`. Also rename `prepublish` → `prepublishOnly` in
package.json so the build hook only fires on publish, not on install.
@vroldanbet vroldanbet requested a review from a team as a code owner May 26, 2026 16:43
@vroldanbet vroldanbet self-assigned this May 26, 2026
Comment thread .github/workflows/automatic-api-update.yaml Outdated
@tstirrat15 tstirrat15 force-pushed the fix/auto-api-update-pnpm branch from 5833bb9 to 55742b8 Compare May 26, 2026 16:52
Copy link
Copy Markdown
Contributor

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tstirrat15 tstirrat15 merged commit e9266ef into main May 26, 2026
14 checks passed
@tstirrat15 tstirrat15 deleted the fix/auto-api-update-pnpm branch May 26, 2026 16:57
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants