Skip to content
Latchkey

How to Set Up CI for Release Branches

A release branch freezes a candidate for stabilization while main keeps moving; CI runs heavier checks and packaging there.

When you cut release/x.y, CI should run more than the PR suite: integration tests, packaging, and a deploy to a release or staging environment. Only bug fixes land on the release branch, and they get cherry-picked back to main.

Steps

  • Create release/x.y from main when you start stabilizing.
  • Trigger CI on push to release/** with the full integration suite.
  • Build and version the release artifact from that branch.
  • Tag and deploy once the branch is green, then merge fixes back to main.

Workflow

.github/workflows/release.yml
on:
  push:
    branches: ['release/**']
jobs:
  release-candidate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm run test:integration
      - name: Build versioned artifact
        run: npm run build && npm pack
      - run: ./deploy.sh release-staging

Gotchas

  • Fixes made only on the release branch and never merged back cause regressions in the next release.
  • Keep release branches short-lived; long stabilization windows signal weak trunk quality.

Related guides

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