Skip to content

ci: automate releases with commitizen via dev - #948

Merged
EVWorth merged 1 commit into
devfrom
claude/hopeful-bardeen-1k4d1h
Nov 8, 2026
Merged

EVWorth merged 1 commit into
devfrom
claude/hopeful-bardeen-1k4d1h

Conversation

@EVWorth

@EVWorth EVWorth commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Releases become automatic, using the same commitizen approach as the maintainer's solaredge repository, with one change: work collects on a dev branch, and merging a standing dev → main PR cuts the release.

Flow

  1. Every PR targets dev, Dependabot and the weekly dprint bump included. PRs are squash-merged. pr-title.yml checks the title is a conventional commit, because that title is what decides the release. It also fails any PR into main that doesn't come from dev.
  2. release-pr.yml runs on every push to dev. It opens or updates one dev → main PR, titled with the version merging it would release (Release v1.6.0), with that release's changelog in the body.
  3. Merging that PR with a merge commit runs auto-release.yml:
    • Commitizen picks the version from the commits since the last tag: fix:/perf:/refactor: give a patch, feat: a minor, ! or BREAKING CHANGE a major. Other types release nothing.
    • scripts/bump-version.sh writes the five version files, and commitizen prepends CHANGELOG.md.
    • release: X.Y.Z and the annotated vX.Y.Z tag are pushed to main together (--atomic).
    • It then calls release.yml directly, because a tag pushed with GITHUB_TOKEN starts no workflow.
    • release.yml builds the four platforms and attaches latest.json. The release stays a draft until then and is published after.
    • Finally main is merged back into dev.
    • If the release PR was squash-merged, the run stops with an error.

Details

  • .cz.toml:
    • version_provider = "scm": the tag is the source of truth and the files follow it.
    • tag_format = "v$version" and changelog_start_rev = "v1.4.0".
  • Commitizen 4.18.0 is installed with --require-hashes from .github/release/requirements.txt, generated by uv pip compile.
  • release.yml:
    • Gains workflow_call with a tag input and secrets passed explicitly.
    • Every checkout uses the tag.
    • Concurrency is keyed by the tag.
    • Release notes are the CHANGELOG section plus the downloads table.
    • The tag trigger stays for re-tagging after a failed build.
  • just bump now calls scripts/bump-version.sh and is only for fixing version drift.
  • ci.yml also runs on PRs into dev and on pushes to dev. The release PR is opened by Actions and gets no pull_request runs, so its checks come from the push run on the same commit.
  • Dependabot uses target-branch: dev. dprint-update.yml checks out dev and opens its PR against it.
  • AGENTS.md, CLAUDE.md, CONTRIBUTING.md, docs/CI.md, docs/RELEASING.md and the release skill describe the new flow.

Bootstrap

v1.5.0 was never tagged. Commitizen computes 1.5.0 from the commits since v1.4.0, so the first release PR merge releases v1.5.0, including everything merged since the 1.5.0 bump. No manual tag push is needed.

Repository settings (manual, can't be done in a PR)

  • Set the default branch to dev. Dependabot reads its config from the default branch, and security updates ignore target-branch.
  • Allow merge commits, for the release PR.
  • Let Actions create PRs. This is already on for dprint-update.
  • If main has a ruleset, let GitHub Actions bypass it so the bump commit can be pushed.

Verified locally

  • Commitizen, on a scratch clone of main:
    • Bootstrap computes 1.5.0 from v1.4.0.
    • The bump commit carries all five files, including the Cargo.lock entry via cargo update --workspace, which also works with an empty cargo cache.
    • The tag is annotated, and a follow-up fix: gives 1.5.1.
    • A no-op run exits 0 with --no-raise 3,21.
    • --dry-run --incremental prints only the new section.
  • Lint:
    • actionlint with shellcheck is clean.
    • check-action-pins.sh, dprint check, check-documented-commands.sh, check-test-mocks.sh and all scripts/test-*.sh pass.

The workflows themselves only prove out on the first real release PR.


Generated by Claude Code

Work now collects on a dev branch. release-pr.yml keeps one dev -> main
PR open, titled with the version it would release and carrying its
changelog. Merging it (merge commit, not squash) runs auto-release.yml:
commitizen picks the version from the conventional commits since the
last tag, bump-version.sh writes the five version files, the CHANGELOG
section is prepended, and the bump commit and tag go to main together.
release.yml is then called directly (a GITHUB_TOKEN tag push starts no
workflow), builds all four platforms and publishes once latest.json is
attached. main is merged back into dev.

pr-title.yml checks PR titles into dev are conventional commits, since
the squash title decides the release, and allows only dev to target
main. Dependabot, the dprint bump and CI follow dev. The release skill
and docs describe the new flow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WTypK4RjzzdjoFxd3qk14g
@EVWorth
EVWorth merged commit f57819f into dev Nov 8, 2026
15 checks passed
@EVWorth
EVWorth deleted the claude/hopeful-bardeen-1k4d1h branch November 8, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants