fix: use pnpm in automatic-api-update workflow#273
Merged
Conversation
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.
tstirrat15
reviewed
May 26, 2026
5833bb9 to
55742b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
automatic-api-update.yamlstill ranbahmutov/npm-install@v1+yarn run bufafter the pnpm migration.npm installfired the deprecatedprepublishhook (pnpm build), but pnpm wasn't installed → exit 127 (failed run).pnpm/action-setup@v6andpnpm run buf.prepublish→prepublishOnlyso the build hook fires on publish, not on install.Test plan
api_updaterepository_dispatch event and confirm the job reaches "Create Pull Request".npm publish(via release) still producesdist/via theprepublishOnlyhook.