ci: restructure release pipeline into a single atomic release commit #95

Merged
lars merged 1 commits from ci/restructure-release-pipeline into master 2026-09-04 08:20:57 +02:00
Owner

Every merge to master previously produced three separate commits (bump
version -> update changelog, tagged here -> update README badges), so
the published tag never carried the current release's own README
badges, and the badge commit leaked into the next release's changelog
since no cliff.toml parser skipped it.

  • Extract the bump/changelog/badge assembly into
    .gitea/scripts/release-commit.sh, used by both the merge-to-master
    path and the hand-pushed-tag sync path, so every tag now points at
    one complete "chore: release vX.Y.Z" commit. Push the commit and its
    tag atomically.
  • sync-version-on-tag now refuses to touch a tag whose commit isn't
    reachable from master (rather than silently rewriting an unreviewed
    tree), and builds a proper release commit via the same script when
    it does need to correct a hand-pushed tag's version.
  • publish-package now depends only on sync-version-on-tag: since a tag
    can only pass that guard if its commit is already on master, and
    master is always fully checked, re-running the lint/type/test matrix
    on tag pushes was redundant.
  • Factor the repeated checkout/setup-uv/env/sync steps into a local
    composite action (.gitea/actions/setup), fix test's needs to
    include ruff-format, and bump actions/upload-artifact to v4.
  • cliff.toml: skip "chore: release ..." commits from the changelog.

Verified by dry-running release-commit.sh against a scratch worktree
for all three code paths (patch bump, --no-bump, explicit VERSION
sync), confirming idempotency and that the resulting commit carries
pyproject.toml, .bumpversion.toml, uv.lock, CHANGELOG.md and README.md
together.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01NnotyatakKNS4NLjDbfYw1

Every merge to master previously produced three separate commits (bump version -> update changelog, tagged here -> update README badges), so the published tag never carried the current release's own README badges, and the badge commit leaked into the next release's changelog since no cliff.toml parser skipped it. - Extract the bump/changelog/badge assembly into .gitea/scripts/release-commit.sh, used by both the merge-to-master path and the hand-pushed-tag sync path, so every tag now points at one complete "chore: release vX.Y.Z" commit. Push the commit and its tag atomically. - sync-version-on-tag now refuses to touch a tag whose commit isn't reachable from master (rather than silently rewriting an unreviewed tree), and builds a proper release commit via the same script when it does need to correct a hand-pushed tag's version. - publish-package now depends only on sync-version-on-tag: since a tag can only pass that guard if its commit is already on master, and master is always fully checked, re-running the lint/type/test matrix on tag pushes was redundant. - Factor the repeated checkout/setup-uv/env/sync steps into a local composite action (.gitea/actions/setup), fix `test`'s `needs` to include ruff-format, and bump actions/upload-artifact to v4. - cliff.toml: skip "chore: release ..." commits from the changelog. Verified by dry-running release-commit.sh against a scratch worktree for all three code paths (patch bump, --no-bump, explicit VERSION sync), confirming idempotency and that the resulting commit carries pyproject.toml, .bumpversion.toml, uv.lock, CHANGELOG.md and README.md together. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NnotyatakKNS4NLjDbfYw1
lars added 1 commit 2026-09-03 18:30:10 +02:00
ci: restructure release pipeline into a single atomic release commit
CI / Sync project version with tag (hand-pushed tags only) (pull_request) Has been skipped
CI / Publish package to Gitea package registry (pull_request) Has been skipped
CI / Lint (ruff check) (pull_request) Successful in 19s
CI / Type check (ty) (pull_request) Successful in 16s
CI / Format (ruff format) (pull_request) Successful in 24s
CI / Tests (pull_request) Successful in 2m27s
CI / Release (bump, changelog, badges, tag) on merge to master (pull_request) Has been skipped
8971121167
Every merge to master previously produced three separate commits (bump
version -> update changelog, tagged here -> update README badges), so
the published tag never carried the current release's own README
badges, and the badge commit leaked into the next release's changelog
since no cliff.toml parser skipped it.

- Extract the bump/changelog/badge assembly into
  .gitea/scripts/release-commit.sh, used by both the merge-to-master
  path and the hand-pushed-tag sync path, so every tag now points at
  one complete "chore: release vX.Y.Z" commit. Push the commit and its
  tag atomically.
- sync-version-on-tag now refuses to touch a tag whose commit isn't
  reachable from master (rather than silently rewriting an unreviewed
  tree), and builds a proper release commit via the same script when
  it does need to correct a hand-pushed tag's version.
- publish-package now depends only on sync-version-on-tag: since a tag
  can only pass that guard if its commit is already on master, and
  master is always fully checked, re-running the lint/type/test matrix
  on tag pushes was redundant.
- Factor the repeated checkout/setup-uv/env/sync steps into a local
  composite action (.gitea/actions/setup), fix `test`'s `needs` to
  include ruff-format, and bump actions/upload-artifact to v4.
- cliff.toml: skip "chore: release ..." commits from the changelog.

Verified by dry-running release-commit.sh against a scratch worktree
for all three code paths (patch bump, --no-bump, explicit VERSION
sync), confirming idempotency and that the resulting commit carries
pyproject.toml, .bumpversion.toml, uv.lock, CHANGELOG.md and README.md
together.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NnotyatakKNS4NLjDbfYw1
lars merged commit fffde48ed8 into master 2026-09-04 08:20:56 +02:00
lars deleted branch ci/restructure-release-pipeline 2026-09-04 08:21:00 +02:00
Sign in to join this conversation.