Conversation
There was a problem hiding this comment.
Review: Auto version bump workflow
The overall approach is sound — bot-actor guard + [skip ci] for loop prevention is a belt-and-suspenders setup, and scoping permissions to contents: write is appropriate. Two issues need to be addressed before merging.
Bug: package-lock.json is not updated
package-lock.json contains its own top-level "version" field (currently "2.0.0"). The workflow updates package.json via jq but never touches the lock file. After the bump commit, package.json and package-lock.json will be out of sync, causing npm ci to fail with:
npm ci can only install packages when your package.json and package-lock.json are in sync
The simplest fix is to replace the manual jq manipulation with npm version:
- name: Bump patch version
id: bump
run: |
NEW_VERSION=$(npm version patch --no-git-tag-version)
echo "version=${NEW_VERSION#v}" >> "$GITHUB_OUTPUT"
echo "Bumped to $NEW_VERSION"npm version patch --no-git-tag-version updates both package.json and package-lock.json atomically. Then update the commit step to also stage the lock file:
git add package.json package-lock.jsonMinor: Race condition on concurrent merges
If two PRs are merged to main in quick succession, both workflow runs will read the same version before either commits, and one push will fail (diverged history). The failed run leaves the version un-bumped with no retry.
This is low-severity (concurrent merges to main are uncommon), but worth noting. A simple mitigation is to add fetch-depth: 0 on checkout and rebase before pushing, or accept the failure as acceptable noise.
What looks good
- Bot-actor skip guard (
github.actor != 'github-actions[bot]') correctly prevents infinite re-triggering [skip ci]also prevents CI re-runs on the bump commitjq > tmp.json && mvis safe — avoids read/write races on the same file- The dispatch payload is well-structured and uses
GH_TOKENenv var correctly (no secret leakage) contents: writeis the minimum permission needed
Summary
package.jsonwhen a PR is merged to mainupstream-releaseevent toEmbarkStudios/embark-ai-toolsso the plugin version is synced thereif: github.actor != 'github-actions[bot]')[skip ci]in commit message to avoid triggering CI on version bump commitsSetup needed
After merging, add a secret
EMBARK_AI_TOOLS_DISPATCHcontaining a GitHub PAT withreposcope onEmbarkStudios/embark-ai-tools.Companion PRs
plugin-version-bump.yml)version-bump.yml🤖 Generated with Claude Code