Skip to content
Latchkey

How to Propagate a Version Bump Across Repositories

A release in the shared library dispatches a bump into each consumer repo, which edits its manifest and opens a pull request with the new version.

On tag push in the library, fan out repository_dispatch (or gh workflow run) to each consumer. Each consumer runs a bump workflow that updates the dependency and opens a PR with peter-evans/create-pull-request.

Steps

  • On the library release, loop over consumer repos and dispatch a bump event with the new version.
  • In each consumer, update the manifest to the dispatched version.
  • Open a pull request so CI validates the bump before merge.

Consumer bump workflow

.github/workflows/bump.yml
on:
  repository_dispatch:
    types: [lib-bump]
jobs:
  bump:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm pkg set dependencies.@my-org/lib=${{ github.event.client_payload.version }}
      - uses: peter-evans/create-pull-request@v6
        with:
          commit-message: "chore: bump @my-org/lib to ${{ github.event.client_payload.version }}"
          branch: bump/my-org-lib
          title: "Bump @my-org/lib"

Gotchas

  • Open a PR instead of pushing to the default branch so consumer CI can validate the bump.
  • Renovate or Dependabot can cover routine bumps; reserve dispatch for immediate coordinated rollouts.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →