refactor(ci): unify build and release workflows#1313
Conversation
6664f21 to
503830d
Compare
|
Rebased this draft PR on bf66fa6 and force-pushed 503830d. Conflict resolution: the three old workflow files are still intentionally deleted, and I ported the new upstream workflow fixes into Local validation: |
Greptile SummaryThis PR replaces three separate workflow files (
Confidence Score: 3/5Safe to merge for CI/build runs, but the combined release publish path has an unverified macOS artifact naming assumption that could cause the first real tag release to fail. The dev-prerelease and build paths work correctly as migrated. The concern is the .github/workflows/release.yml — specifically the Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
E1([schedule / workflow_dispatch]) --> preflight
E2([push to master or v* tag]) --> build-qt
E2 --> build-tauri
E3([pull_request to master]) --> build-qt
E3 --> build-tauri
preflight{Pre-flight checks} -->|should_release=true| create-tag
create-tag -->|pushes v* tag via PAT → new run| E2
E2 -->|tag push only| release-notes
build-qt -->|tag push only| release
build-tauri -->|tag push only| release
release-notes -->|tag push only| release
release([Publish draft GitHub release])
style preflight fill:#f0e68c
style create-tag fill:#f0e68c
style release fill:#90EE90
Reviews (1): Last reviewed commit: "refactor(ci): unify release workflows" | Re-trigger Greptile |
| libxrender-dev | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| if [ "$RUNNER_OS" == "Windows" ]; then | ||
| choco install innosetup | ||
| fi | ||
| pip3 install poetry==1.4.2 | ||
|
|
||
| - name: Build | ||
| run: | | ||
| python3 -m venv venv | ||
| source venv/bin/activate || source venv/Scripts/activate | ||
| poetry install | ||
| make build SKIP_WEBUI=${{ matrix.skip_webui }} SKIP_SERVER_RUST=${{ matrix.skip_rust }} | ||
| pip freeze | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| source venv/bin/activate || source venv/Scripts/activate | ||
| make test SKIP_SERVER_RUST=${{ matrix.skip_rust }} |
There was a problem hiding this comment.
macOS DMG filename collision in unified release
Both build-qt (line 352) and build-tauri (line 532) rename their macOS output to the identical pattern activitywatch-${VERSION_TAG:-...}-macos-x86_64.dmg. They are uploaded to different artifact containers (builds-macos-14-py3.9 vs builds-tauri-macos-14-py3.9), but when the release job's dist/*/activitywatch-*.* glob collects them both, softprops/action-gh-release@v2 will attempt to upload two assets with the same basename to a single GitHub release, which will either error out or silently overwrite one. The PR description claims distinctness via a activitywatch-tauri-… prefix, but the actual mv command in build-tauri's "Package dmg" step (line 532) produces the same name as build-qt's. If the Makefile or Tauri packaging path never actually creates dist/ActivityWatch.dmg when TAURI_BUILD=true, the step is dead code and the collision never occurs — but that assumption is invisible from the workflow file alone and should be made explicit.
There was a problem hiding this comment.
The DMG names are already distinct at the actual command. Qt produces activitywatch-${VERSION_WITH_V}-macos-$(uname -m).dmg (line 385) and Tauri produces activitywatch-tauri-${VERSION_WITH_V}-macos-$(uname -m).dmg (line 603). The tauri- prefix is present in the final rename — so when the release job's glob collects both artifact sets, the basenames are distinct and softprops/action-gh-release won't see a collision.
Two other corrections on the review's framing: the variable is VERSION_WITH_V (not VERSION_TAG), and the architecture suffix is dynamic ($(uname -m)) rather than hardcoded to x86_64.
|
|
||
| source venv/bin/activate | ||
| make dist/ActivityWatch.dmg | ||
|
|
There was a problem hiding this comment.
Single platform failure in either matrix blocks the entire combined release
In the old split design, build.yml and build-tauri.yml each had independent release jobs, so a flaky Tauri build on one platform only blocked the Tauri release while Qt artifacts were still published. With needs: [build-qt, build-tauri, release-notes], a single flaky matrix run in either of the 9 total build jobs (4 Qt + 5 Tauri) now blocks publishing any artifacts at all. If build-tauri's ubuntu-24.04-arm job is unstable, the combined release will never be published. Consider whether continue-on-error at the matrix level or a separate release step per build group better matches the desired failure semantics.
There was a problem hiding this comment.
Acknowledged — this is an intentional trade-off. The old split design did mean a flaky Tauri platform left Qt artifacts publishable independently, so the combined needs: [build-qt, build-tauri, release-notes] gate does tighten the coupling.
The rationale for accepting it: real tag releases are rare, manual, and happen on a stable commit — transient flakiness is less likely to bite there than on the dev-prerelease path (which this workflow also handles). If the arm64 or other Tauri job proves unstable in practice, adding continue-on-error: true at the matrix level or splitting into per-group release steps is a straightforward follow-up. Leaving this note here so the trade-off is visible to reviewers.
Summary
dev-release.yml,build.yml, andbuild-tauri.ymlworkflows with a singlerelease.ymlTesting
.github/workflows/release.ymlwithpython3+yaml.safe_loadgit diff --checkactivitywatch-...andactivitywatch-tauri-...names, so the combined release upload set is collision-safeRefs #1219