fix(ci): refactor release pipeline triggers, naming, and cleanup (#103) #104

Merged
ValleyGeek merged 3 commits from 0.1.35-enhancement.103 into main 2026-06-19 16:04:07 +00:00
Member

Summary

  • linux-appimage.yml/windows-release.yml no longer carry their own independent push trigger; ci.yml is now the sole entry point for release builds (needs: test, never on pull_request), eliminating the ungated/duplicate dev-branch build race and the dead workflow_run branch-resolution code that produced PR#-numbered release titles (e.g. Bulk Image Organizer Dev (102)).
  • Reusable workflow jobs renamed to describe the deliverable (build-appimage, build-windows-exe); ci.yml gained its own concurrency group so superseded pushes to the same branch are cancelled.
  • Release bodies are now generated from the matching CHANGELOG.md section (scripts/build-release-notes.py) instead of a boilerplate "Automated build for X at Y" repeat of the title.
  • New scripts/prune-orphaned-dev-releases.py reconciles dev releases against currently-existing branches; wired into scripts/prune-merged-branches.py (agent-run per AGENTS.md step 8) and a new best-effort daily cron workflow (prune-orphaned-releases.yml), as a backstop to the existing per-branch delete-triggered prune.
  • docs/DECISIONS.md DR-022 records the redesign; docs/DESIGN.md/docs/TECHNICAL_OUTLINE.md updated to match.
  • Live cleanup already executed against this repo's Forgejo releases: deleted 12 of 19 releases that were either orphaned (branch deleted/merged) or PR#-numbered duplicates. Only the 6 v0.1.3x main releases and the one release for the still-live 0.1.34-adhoc.windows-release-skip-fix branch remain.

No application code changed (src/, resources/, pyproject.toml untouched), so VERSION stays 0.1.35 per the compiled-input bump rule.

Fixes #103

Test plan

  • ruff check . && ruff format --check .
  • pytest (363 passed, 1 skipped) including new tests/test_build_release_notes.py and tests/test_prune_orphaned_dev_releases.py
  • Dry-ran scripts/prune-orphaned-dev-releases.py and scripts/build-release-notes.py locally against live repo state before applying
  • Watch the next real CI run on this branch/PR to confirm linttestbuild-appimage/build-windows-exe fire correctly, are skipped on pull_request, and concurrency cancellation works on a follow-up push
  • If any Forgejo branch-protection rule references the old job names release-linux/release-windows/build-release as a required status check, update it to the new names (build-appimage/build-windows-exe)
## Summary - `linux-appimage.yml`/`windows-release.yml` no longer carry their own independent `push` trigger; `ci.yml` is now the sole entry point for release builds (`needs: test`, never on `pull_request`), eliminating the ungated/duplicate dev-branch build race and the dead `workflow_run` branch-resolution code that produced PR#-numbered release titles (e.g. `Bulk Image Organizer Dev (102)`). - Reusable workflow jobs renamed to describe the deliverable (`build-appimage`, `build-windows-exe`); `ci.yml` gained its own `concurrency` group so superseded pushes to the same branch are cancelled. - Release bodies are now generated from the matching `CHANGELOG.md` section (`scripts/build-release-notes.py`) instead of a boilerplate "Automated build for X at Y" repeat of the title. - New `scripts/prune-orphaned-dev-releases.py` reconciles dev releases against currently-existing branches; wired into `scripts/prune-merged-branches.py` (agent-run per AGENTS.md step 8) and a new best-effort daily cron workflow (`prune-orphaned-releases.yml`), as a backstop to the existing per-branch `delete`-triggered prune. - `docs/DECISIONS.md` DR-022 records the redesign; `docs/DESIGN.md`/`docs/TECHNICAL_OUTLINE.md` updated to match. - **Live cleanup already executed** against this repo's Forgejo releases: deleted 12 of 19 releases that were either orphaned (branch deleted/merged) or PR#-numbered duplicates. Only the 6 `v0.1.3x` main releases and the one release for the still-live `0.1.34-adhoc.windows-release-skip-fix` branch remain. No application code changed (`src/`, `resources/`, `pyproject.toml` untouched), so `VERSION` stays `0.1.35` per the compiled-input bump rule. Fixes #103 ## Test plan - [x] `ruff check . && ruff format --check .` - [x] `pytest` (363 passed, 1 skipped) including new `tests/test_build_release_notes.py` and `tests/test_prune_orphaned_dev_releases.py` - [x] Dry-ran `scripts/prune-orphaned-dev-releases.py` and `scripts/build-release-notes.py` locally against live repo state before applying - [ ] Watch the next real CI run on this branch/PR to confirm `lint` → `test` → `build-appimage`/`build-windows-exe` fire correctly, are skipped on `pull_request`, and concurrency cancellation works on a follow-up push - [ ] If any Forgejo branch-protection rule references the old job names `release-linux`/`release-windows`/`build-release` as a required status check, update it to the new names (`build-appimage`/`build-windows-exe`)
linux-appimage.yml and windows-release.yml each declared their own
independent push trigger in addition to being called via workflow_call
from ci.yml, so dev-branch release builds fired immediately on push,
ungated by lint/test, racing the ci.yml pipeline. Both workflows also
carried dead workflow_run branch-resolution code for an event they never
declared, which live release history shows produced PR#-numbered release
titles (e.g. "Bulk Image Organizer Dev (102)") instead of branch names.

ci.yml is now the sole trigger for release builds: the reusable workflows
keep only workflow_call/workflow_dispatch, run for any push (gated on
needs: test, never on pull_request), and resolve branch/sha only from the
real git ref. Job ids are renamed to describe the deliverable
(build-appimage, build-windows-exe). ci.yml gains its own concurrency
group so redundant lint/test runs on the same branch cancel each other.

Release bodies are now generated by scripts/build-release-notes.py, which
extracts the matching CHANGELOG.md section instead of repeating the title.
prune-dev-release.yml only fires on a single branch's delete webhook and
has no way to recover a missed event or clear backlog. A live audit found
12 of 19 releases on the real instance were orphaned (branch gone, or a
PR#-numbered duplicate of a correctly-named dev release).

scripts/prune-orphaned-dev-releases.py lists releases and branches via the
Forgejo API, keeps every v{version} tag plus any dev-* tag whose slug
matches a live branch, and deletes the rest. It's wired into
scripts/prune-merged-branches.py (run by agents per AGENTS.md step 8, with
a --skip-release-prune escape hatch) and into a new best-effort daily
schedule workflow, prune-orphaned-releases.yml, as a second safety net.
docs: record CI release-pipeline redesign (DR-022)
All checks were successful
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 2m6s
CI / build-appimage-1 (pull_request) Has been skipped
CI / build-appimage (pull_request) Successful in 0s
CI / build-windows-exe-1 (pull_request) Has been skipped
CI / build-windows-exe (pull_request) Successful in 0s
f7f1a275f0
ValleyGeek deleted branch 0.1.35-enhancement.103 2026-06-19 16:04:07 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ai-collab/bulk-image-organizer!104
No description provided.