Skip to content

ci: drive releases with release-please instead of commitizen - #433

Merged
loonghao merged 1 commit into
mainfrom
chore/migrate-to-release-please
Sep 25, 2026
Merged

loonghao merged 1 commit into
mainfrom
chore/migrate-to-release-please

Conversation

@loonghao

Copy link
Copy Markdown
Owner

What changes

Replaces commit-driven version bumps with release-please.

Today a push to the default branch runs commitizen, which bumps the version, commits it back and tags it; a second tag-triggered workflow then publishes. That couples the version to whoever happened to push, and the version files drift apart when a bump is missed.

With release-please the conventional commits already in the history decide the version. It opens a chore: release vX.Y.Z PR containing the bump, the CHANGELOG entry and every marked version file; merging it creates the tag and GitHub Release, and the release workflow publishes from there.

Changes

  • release-please-config.json + .release-please-manifest.json, seeded at 0.24.2
  • .github/workflows/release.yml: release-please, build, publish and asset-attach in one workflow, on main
  • every version-bearing file carries an x-release-please-version marker
  • [tool.commitizen] removed from pyproject.toml
  • scripts/ci/ vendored: releasable-commit gate, dist/version check, version consistency check
  • removed: bumpversion.yml, python-publish.yml

Why one workflow (where it applies)

GitHub never starts a workflow from a tag, release or commit created with the default GITHUB_TOKEN. Where publishing moved into the release workflow, it had to live in the same workflow as release-please; the release-please step uses RELEASE_PLEASE_TOKEN (falling back to PERSONAL_ACCESS_TOKEN) so the release PR also carries CI status.

Verification

  • all workflow YAML parses; both release-please JSON files parse
  • python3 scripts/ci/check_version_consistency.py passes: manifest 0.24.2 matches every managed file
  • nothing is published by this PR - release-please only cuts a release when its PR is merged

Before merging

  • the pypi GitHub environment exists for this repo (or publishing will fail after the tag is cut)
  • RELEASE_PLEASE_TOKEN or PERSONAL_ACCESS_TOKEN is available to the repo

Repo-specific notes

Package dir is photoshop, dist name photoshop-python-api. test/manual_test asserts a Photoshop application version, not the package version - leave it.

Conventional commits now own the version: merging the
"chore: release vX.Y.Z" PR creates the tag and GitHub Release, and the release
workflow builds the wheel/sdist, publishes to PyPI and attaches the artifacts.

- add release-please-config.json and .release-please-manifest.json
- replace the commitizen bump-commit workflow with release-please
- mark every version-bearing file with x-release-please-version so the bump
  cannot leave a stale copy behind
- drop [tool.commitizen] from pyproject.toml
- vendor scripts/ci/ (releasable-commit gate, dist/version check, version
  consistency check)

Repo-specific notes:
- Package dir is `photoshop`, dist name photoshop-python-api. test/manual_test asserts a Photoshop application version, not the package version - leave it.
@loonghao
loonghao force-pushed the chore/migrate-to-release-please branch from 9ad00f2 to ecadbd1 Compare September 25, 2026 14:52
@loonghao
loonghao merged commit f196a2b into main Sep 25, 2026
10 checks passed
@loonghao
loonghao deleted the chore/migrate-to-release-please branch September 25, 2026 16:24
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.

1 participant