feat(ci): add automated dev release workflow#1217
feat(ci): add automated dev release workflow#1217TimeToBuildBob wants to merge 7 commits intoActivityWatch:masterfrom
Conversation
Greptile SummaryThis PR introduces an automated biweekly dev/prerelease workflow ( Key findings:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Cron as Cron / workflow_dispatch
participant PF as preflight job
participant GH as GitHub API
participant CT as create-tag job
participant BW as build.yml / build-tauri.yml
Cron->>PF: trigger (Thursday biweekly or manual)
PF->>PF: check ISO week parity (schedule only)
PF->>PF: git tag → find latest_stable + last_prerelease
PF->>PF: compute next_tag (vX.Y.ZbN)
PF->>PF: git rev-list → count commits since since_ref
PF->>GH: GET /commits/{head_sha}/check-runs
GH-->>PF: CI conclusions for head_sha
PF->>PF: gate on failure / cancelled / pending / no-success
PF-->>CT: should_release=true, next_tag, since_ref, commits_since_ref
Note over PF,CT: ⚠️ head_sha NOT forwarded — race window here
CT->>CT: git checkout ref:master (may be newer commit)
CT->>CT: git tag -a next_tag && git push origin next_tag
CT-->>BW: tag push triggers build workflows
BW->>BW: build & package artifacts
BW->>GH: create/update draft prerelease with artifacts
Last reviewed commit: "fix(ci): simplify de..." |
BelKed
left a comment
There was a problem hiding this comment.
It might be beneficial to generate a release on each commit to the repository, as this could help improve the feedback loop and make iteration faster :)
If this isn’t included in this PR, I think updating the submodules is still important to ensure the app stays up to date, since we don’t have a monorepo structure and the application is distributed across multiple repositories.
That also raises a question: how should updates be handled in the other dependent repositories, especially since some of them also include additional nested repositories?
|
Fixed the critical regression flagged by Greptile (aea0769): Bug: I had hardcoded Fix: Reverted both lines back to the original conditional
The other two Greptile findings (cancelled CI conclusions, fragile self-exclusion filter) are valid secondary issues I can address separately if Erik wants this in before fixing everything. The Windows CI failure is a pre-existing flaky Poetry dependency issue ( |
Address two Greptile review findings:
1. Add `cancelled` and `startup_failure` to the CI failure pattern.
Previously, a cancelled CI run would not block a dev release.
2. Replace fragile hardcoded job name strings with check_suite.id
filtering. The old filter relied on exact job name matches
("Pre-flight checks", "Create dev release") which would break
if jobs were renamed. Now uses GITHUB_RUN_ID to get the current
run's check suite ID and exclude all check runs from it.
Co-authored-by: Bob <bob@superuserlabs.org>
|
Addressed the two secondary Greptile findings (78990e5):
|
|
@TimeToBuildBob Please address @BelKed's comments in #1217 (review) Updating the submodules could be automated, should probably do that. We used to let dependabot e.g. #926 but they have been disabled since we weren't merging them, could re-enable and let them auto-merge on passing CI. ...or we could make it into a monorepo (the path we went in gptme, which has its gptme-contrib repo counterpart for the non-core/app stuff), might actually make sense to do from a purely pragmatic perspective - but it's a fair bit of work and there is a certain logic in keeping the modules of ActivityWatch as separate repos (which would have to get archived if we monorepoify). Monorepo could also risk making a mess of things in the long run. Not doing right now, just thinking aloud... |
|
Thanks for the feedback, @BelKed! Per-commit releases: Biweekly is a deliberate starting point to keep the signal-to-noise ratio manageable — prerelease tags show up in the releases feed and we didn't want to flood it on every commit. That said, the Submodule updates: Agreed this is a gap — a new activitywatch dev release tag doesn't automatically propagate into the dependent repos that pin submodules. A few options Erik and I discussed:
Option 1 is the path of least resistance. I can add a Dependent repos with nested repos: For the deeper nesting (repos that themselves have submodule deps), it gets recursive. That's a reasonable argument for eventually moving toward a monorepo, but as Erik noted, that's a separate and bigger decision. For now, the biweekly dev tag gives a stable anchor that dependent repos can pin to, rather than chasing individual commits. Let me know if you'd like me to add dependabot submodule tracking to this PR, or if you'd prefer to do that as a follow-up. |
|
Addressed Erik's request about submodule propagation in ea344ae. What changed
That gives us the low-maintenance path Erik suggested: new upstream module releases can flow into the meta-repo without adding more custom dispatch logic to I left the release cadence itself biweekly for now. If we want faster feedback later, we can change that independently of the submodule-update mechanism. |
|
Addressed the remaining review thread in ef4fb4e. What changed
That job only tags I also resolved the remaining Greptile threads that were already fixed in 78990e5 (cancelled CI handling + robust self-exclusion). |
|
Quick status update:
So this should be ready to merge from my side. |
|
@greptileai review |
|
@TimeToBuildBob See remaining Greptile comments. Also, why didn't you do the unified release.yml design in https://github.com/gptme/gptme/blob/master/.github/workflows/release.yml that we ended up landing on during gptme/gptme#1643 ? I think putting it in a single file like release.yml would make sense, but I notice both build + release is in build.yml right now. |
|
Fixed the remaining Greptile finding in fba875b. What changed
That closes the real bug here: we now tag the exact commit whose CI status was checked, instead of re-reading On the So my take is:
If you want, I can do that follow-up refactor next instead of stretching this PR further. |
|
Quick follow-up on Erik's I spun the architectural cleanup out into #1219 so this PR can stay focused on landing the dev prerelease pipeline without turning into a bigger CI refactor. That follow-up tracks unifying the current split setup into a single Current PR status from my side:
So I still think #1217 is ready to merge, with #1219 as the explicit cleanup follow-up. |
Summary
Why
ActivityWatch wants gptme-style automated dev/nightly releases so users can test upcoming changes before a stable release. The repo already had decent tag-based packaging; it was just missing the automation layer that decides when to cut a prerelease tag.
This keeps the design simple:
dev-release.ymldecides if a prerelease should happen and pushes the nextvX.Y.ZbNtagbuild.yml/build-tauri.ymlcontinue doing the actual packaging + draft release creationNotes
masteris not greenCloses #1216